GSoC – week 12: Almost Done

During this week I finished up the function to make a blog post, also with the upload of an image. This has taken a very long time and headaches, I’ve tried a lot of combinations to make this upload correct, but sometimes I got an xml with error on it and sometimes the xml looks good but the url point to a corrupted image (e.g. nothing to show), but at last, with the help of my mentor, I found out the problem and fixed it (basically I forgot to use the tag :/).
I’ve also fixed the multi-blogs part, now you can add more than one blog and choose the one to use on the fly, by the vertical menu that will show you a dialog with a dropdown list where you can select the blog you want to use.
Due to the problems I had with the image upload, that’s all for this week.
For the next week I’ll finish the comments/pages management, and I’ll do some lifting on the app.
Since we are approaching the ‘pencil down’ deadlines the next week should be the last for making some code, and I think this is fine, I feel in time with the schedule.
Later on today I’ll update the repo with the latest sources.

#blackberry, #gsoc

GSoC – week 11 : Something real

This has been an intensive week. I’ve merged other pieces of code…and that’s what I got:


What currently works, as you may understand from the screen shot above, is the view of posts/pages/comments, they are all displayed in a same-style listview, for the comments I coloured the status to get an hint at a first look.
The app is also capable of making a new post (no media yet, but I’m working on this).
I’ve created three menus, one contains the links to see the lists, another (on the right) contains the common actions to add a post/page/comment or refresh the page.
There is also another menu, that will appear once you long-press an item that would let you edit or delete it. There a problem raise up, it looks like this menu isn’t capable to access the other (already declared) available resources. I hope to found a solution/workaround quickly.
So, what is missed, and what I’ve to implement yet is: a better managment for multi-blogs (my mentor gave me a simple and huge advice on how to do that, so it would be done in a few days), the media upload stuff and complete the comments/pages managment.
That would be basically all, the app is ready now, you can test it if you want, the code is on the official repo.

#blackberry, #gsoc

GSoC – week 10 : Stumbling upon

In this week I had to face off with an hiccup (that really drives me nuts) due to a strange behavior during the XML parsing. Since I’m parsing the XML in Qt, I’ll put all the elements in a QvariantMap, but, it looks like, that some times the pairs key:value goes overwritten and return an unexpected value. I think I found out the reason and I made a quick workaround to fix this issue, I’ll dig more on it to find a stable solution.
Due to this hiccup I haven’t finished yet the UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. part to make a post, I’ll hope, in order to get back on schedule, to have it done until the end of this week.
As suggested by my mentor, from the comment of the last week’s post, I’ve created another UI for the posts/pages/comments page using a vertical menu (sx) that contains the links to go to the Posts/Pages/Comments pages, and another vertical menu (dx), that would be a contextual menu, currently it only contains the actions of add/edit/delete (post/page/comment), not yet fully implemented.
There another little problem raise up, since I’m using a NavigationPane to go forward and back through the pages, and, for this new UI, I have to use a TabbedPane; well, a NavigationPane cannot call a page that contains a TabbedPane. I have to find a solution, I’ve already talked on #blackberrydev on IRC, they suggested some workaround, but nothing that has convinced me. I’ll dig more on this as well.
In the next days I’ll update the code on the repo.

#blackberry, #gsoc

GSoC – week 9 : merging up

During this lazy week (due to the mid-august holiday, that here in Sicily we spent all day and night in the beach, and everybody is on holiday) , I’ve finished the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. for the function that make a post. I’ve also created some mock-ups about the post view, I’ve thinked about a lot of solutions, and I’ve shared some of these mock-up with my mentor, awaiting feedback. The most challenging part was that, in my mind, I would like to create some sort of skeleton of a basic UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. to re-use it in the other pages (like comments, pages etc)
I’ve also populated the repo with the last code, that is a merge for the standalone functions that I’ve created before the UI. Nowadays the app is capable of doing the login process, searching for the XML-RPC endopoint, fetch the blog(s) list. There, as my mentor suggested to me, I’ve to modified a bit this function, because if there is just one blog I can skip the blog(s) selection UI. Once the blog(s) are been added, I could do the fetch of the recent posts.
Next step is to finish the UI, that will take no more than other few days, do the other function to make the call to see the comments/pages and merge the function to make a post.

#blackberry, #gsoc

GSoC – week 7 : midterm is here

This week has been marked up by the upcoming midterm evaluation. I would like to do a little summary of what I’ve done till now.

Once I’ve started the Google Summer of Code, with the help of my mentor, we both decided, as for what was on my schedule, to start the project by making some mockup/skecth of the UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing.. This was a first exciting step for me, since I’ve never used ( in a ‘professional’ way ) those kind of tools, my mentor suggested me to use Balsamiq to do this stuff; a new tool to learn, but I think it is worth it, I’m quite sure I’ll use it again (sooner or later).
After this, that maybe has taken some more time than usual since it’s new for me, I’ve started making some code. I’ve improved my skills on Cascades and tried to make a good looking UI. Using Cascades and dealing with the layouts was nice, there are a lot of different layours for different situations and choosing the right one without trying the rest is a risk, so I’ve tried a pair of these, and then I choosed the one that, for me, fits best for the purpose I need (and is also pretty to see).
Later on I’ve made some code to implement the login process, but, the first move I made was partially wrong. Well, the problem is that the login process is a bit more complex than I had imagined. Anyway, thanks to the great help of my mentor that gave me a good understanding on what are the necessary steps to make a good login process, at last, I made it. The next big move has been to integrate this piece of code, in order to connect it with the interaction from the QML. It has been a little bit harder to do since Cascades connects the C++ classes in a different way than the pure QML does (that is what I’ve already used in the past), but, after some headaches, I got it working. So the big login part is almost over.
The current situation is then: a working UI with the fileds (username,password,blog address) to make the login, and a button, that once pressed, it will make some C++ call(s) to deal with the network stuff, downloading/parsing XML/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. and do all the other required steps for the login process.
Recently I’ve implemented a function to make a new blog post (currently without media). It is in an early stage, but, as far as I can tell, it seems to work.
For the next week(s) I will take care about the UI, the representation of the posts (I think I will go with the classic listview). I will also implement some more functionality and moreover, try to understand which features are necessary (or mandatory) to implement and decide where to place it (from a layout point of view).

#blackberry, #gsoc

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

GSoC – week 5: my little baby is born

I would like to present you my, just borned, little baby 🙂

Also if a picture is worth a thousand words, I want (or well, I must 🙂 ) write something more.
This is a first idea on how the login UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. would look like (I think I’ll not change it so much), if anyone have any critics/suggestion or whatever, this would be appreciated.
The login process is working fine, but, as I had a talk with Danilo (my mentor), he explain me, in details, what I need to to do, to make the login process working at it’s best.
As far as I understand, I’ve to create an helper function to discover where the endpoint for the XML-RPC has been placed. The first step, should be that if the user doesn’t fill in the ‘Blog Address’ input, then I’ll set the endpoint on https://wordpress.com (e.g. https://wordpress.com/xmlrpc.php ) and check if there is any records that belong to the given credentials. The second step is that if the user writes something in the ‘Blog Address’ input, than I’ll need to check where is the XML-RPC endpoint, mostly (in standard case), it would be an append on the URL that the user has given, if it has been inserted correctly. The third step is when from the given URL I cannot find the XML-RPC placed where I expected it to be, so I need to call this helper function that will do some parse (HTML and XML) and other (nice) stuff, to catch where the xmlrpc.php has been placed. The helper function is needed, if I understand it correctly, only when the user use a blog on an own host, with the JetPack plugin.
So, for the next week I’ll try to implement this stuff in Qt, Danilo gave me a step-by-step guide, so I hope to not encounter any big blocking issue.

#blackberry, #gsoc

GSoC – week 4 : hard times

This week has been an intense week for me. Due to other duties the work on this project proceeded a little bit slower than expected. Anyway, as I wrote last week, I’ve pointed my attention on how to bind C++ to Cascades. This has been a, some sort of, hard step. The main reason is because the connection in Cascades is a bit diffrent than how I made it with pure QML. The first blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. has been to understand what I exactly need to connect, what kind of calls, signals and others. This has been an hiccup, principally because I had made a long shoot on what I need. So, I’ve been back to my steps, and tried to pick a decision for an actual smaller step.
I’ve created a custom library, and, as a first step I had to deal with the network. I’ve made a first call, connected it with the interaction of the login button, to a c++ class method that uses a QtNetworkRequest to make the call to the WordPress endpoint, then, once the response (the XML) is ready, and we have a QtNetworkReply, I emit a signal with the data. This is the tipical situation that (I think) should be similar for all the other necessary calls.
During the next week I’ll (stress) test this piece of code to see if it’s really working as expected or if there is any hidden bug.
I’ve to say that I’m a bit out of my schedule, but I think I can regain that time almost easily. Nothing to worry about, I think.

#blackberry, #gsoc

GSoC – week 3 : API API and yet API

This week I’ve read and learnt a lot more about BlackBerry 10 APIs, paying attention on the Cascades library. The main reason why I choose to go with Cascades, it’s beacuse with these APIs is possible to create stunning apps, and the platform APIs provide access to the underlying featrues of the BlackBerry Application Platform. It should be easier to create a beautiful UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. together with a set of advanced tools that can be use to easily integrate the app to the system and giving the users an astonishing experience.
Said that, I’ve started with the basic (understanding) of Cascades: the layouts.
The layouts are the basic to construct Uis, and Cascades supports a (large) variety of different layouts that can be used to arrange and position controls in the apps; and, choosing the right one, right now, for me, is a must. After a long digging (write, try, sketch), I think (but I’m not sure at all) I will use a StackLayout, at the least for the login page.
I’ve also made a first (fake) attempt of the login process, but it’s not finished yet. I have to manage how to put all the stuff togheter. I also need to connect the C++ (Qt) signals to Cascades (QML), and, for the next week(s) (I though this is kinda important) this is my milestone. I will write some code to see if I understand correctly how it work, and how it needs to be implemented.
In the next weeks I’ll upload a first draft of what I’m doing.

#blackberry, #gsoc

GSoC – week 2 : gearing up

During this week I focused my attention on the WordPress 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.. I’ve digged into it, looked at how they work, tried to understand which ones are the best and useful calls that best fits my purpose, and tried some calls (just to make sure that I’ve correctly understand the behavior).
Later on I’ve wrote some code (rude and rough, I admit) to execute this kind of calls, and, at the end, I think I will go with making the call, so also create the XML, using Qt. My milestone for the next week is to decide if it’s better to parse the returned XML in Qt or in Cascades (QML) itself.
I’ve also put some attention on the UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing./UXUX UX is an acronym for User Experience - the way the user uses the UI. Think ‘what they are doing’ and less about how they do it., so I made a first UI (just for the login), but I think I’ll complete it in a few days, I also had a discussion on how to make it (in the best way) with my mentor, so I will follow his advices, definitely.
I would also dealing, in the next week, with the bb10 API, to see if I can use it to make something better.
Currently I haven’t used the svn repository; when I will start building a primary version of the WordPress for BlackBerry 10 devices, in the next weeks, I will start uploading stuff, but now, there is no good code that need to be pushed somewhere 🙂

#blackberry, #gsoc