GSoC – week 6 : things get serious

During this week I’ve realized that I should completly re-write the login process. Speaking with my mentor, he gave to me some hints and some steps to follow, to make a good login process.
These steps, at a first attempt, looks simple overall, but, integrate it in Qt/Cascades was a bit hard. To be honest, the most hard part has been to decide how to parse the HTMLHTML HTML is an acronym for Hyper Text Markup Language. It is a markup language that is used in the development of web pages and websites. to find some useful tags (e.g. Some tags that should contain a reference to the xmlrpc endpoint). The first idea that comes up in my mind was to use a regular expression to do it. But, by reading some articles online, many devs say that is not good to parse HTML using regular expression. Just a mandatory quote from a comment on stackoverflow:

“Every time you attempt to parse HTML with regular expressions, the unholy child weeps the blood of virgins, and Russian hackers pwn your webapp. Parsing HTML with regex summons tainted souls into the realm of the living. HTML and regex go together like love, marriage, and ritual infanticide. The cannot hold it is too late. The force of regex and HTML together in the same conceptual space will destroy your mind like so much watery putty. ”

Well, I’m quite agree with that, I get the point, but, in this situation, I think I can use a regular expression, without offending anyone, mostly because I had to catch some tags (two at max!).
So, I come up with a discovery function, that following these steps, ‘sanitize’ (somehow) the ‘Blog Address’ input, switching on determinate actions in base of the input.
Nowdays these steps have been fully implemented in Qt and integrated (but not completly yet) in Cascades. While I’m writing, I found a little problem with the Qnetwork stuff, but it should be fixable within this week.
I’ve also created a very first draft of a possible function to implement the necessary APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. call to make a blog post. For the next week, my milestone, is to fully implement that function and make it work, to get it ready for the midterm evaluation.

#blackberry, #gsoc