0



30Jan2011

Released FatPhone 0.1.

Finally  FatPhone v0.1, a real release (not just an experiment), is ready. Please, let me  call it  alpha release, although it is in the "works for me" status... You can grab the code on github.com/sciabarra/fatphone.

It took me almost 2 weeks of spare time coding (and not only spare time,  since this effort consumed a good amount of  actually billable time...) but the first real release of FatPhone is here!

It is amazing how much work it takes  building something good for public release starting from something that is perfectly fine for internal use.

The installer

The biggest challenge has been actually to code an easy to use installer. I have the FatPhone code since a while, but how can I give it away in a form that can be installed, easily,  in Content Server? The common way of releasing code is using Catalog Mover dumps, but this solution is far from satisfactory.

I was worried that releasing Catalog Mover is going to export proprietary FatWire informations. So I dropped the idea.

After some attempts, I settled for coding a standalone installer. After considering Java,  i decided to code  it  in Javascript instead, using jQuery. Javascript has become amazingly powerful and flexible, these days.

The installer  creates elements in FatWire using the external CatalogMover interface; it creates assets using the XmlPost interface. Because I am only using documented interoperability interfaces (I didn't reverse engineer anything to do so), I should be  safe on the legal side (otherwise, tons of end user browsing Fatwire website are violating some license...).

It was an intense hacking experience (more complex that the whole FatPhone website itself) but at the end I built it and I am pretty happy of the work done.

Installing FatPhone

Using the installer,  setup of FatPhone is very easy, and works with different version of ContentServer. I started using JSK 7.0.2 then I deployed in JSK 7.5.2

Before you start, create a new site (following these directions), and call it FatPhone. Then you have to grab the source code from github and copy the fp directory in the root of the web server sitting in front of your FatWire installation.

Note: don't load the installer in the browser from localhost: it does not work. You have to deliver the fp folder in the same web server as the ContentServer: the JavaScript will then connect to the CatalogManager running in the same server.

The fp folder must be accessible as /fp , so  you can call the installer as http://yoursite/fp/install.html. The /fp directory is hardcoded, for now. This may change in the future.

When you call the installer, you will see the following screen:

You have to type  credentials of an user that can create Elements and  Assets in the site FatPhone. Click on Login, and if everything is ok  you will see the message:

Username/password validated.

Now you can install the Elements. You will see this screen:

Click on "All" to select all the element then click on "Install Elements". If everything is ok (and it should) this is the result.

You can then do the same for the assets and this is the final expected result:

Note that the installer is incremental and supports installation and updating of single Elements and Assets. I am basically using it as a replacement for Content Server Explorer!  I will blog more on this installer in the near future, but for now, let's come back to FatPhone.

The FatPhone site

After the installation, there are some new templates, and a number of pages. Pages are created more as a sample, the real code is in the templates. But the Pages are already available to experiment with. If you search for Pages, this is the list of the created Pages:

After the creation, Pages are all unplaced. You can (and should) arrange them in a hierarchy in the SitePlan as you like.

Note that is the SitePlan that configure the site navigation, so you have to create the site plan.

Here is an example.

The result is now a real iPhone web site that can be navigated. Pages are rendered as full web pages, using the page name as the title, and the page description to list them in a list. Children of a page in the site plan are shown as children of a page in the iPhone site. I used the filename field to specify to the icon for each page in a link. See a couple of screenshot below:

Actually, you should try into an iPhone simulator, because Page transitions have the typical scroll effect of iPhone application. This feature comes directly from the underlying iWebKit toolkit.

What is next?

So far I have implemented:

  • the installer,
  • the layout using iWebKit,
  • the SitePlan hierarchy
  • navigation between pages.

The project is far from complete, and I have still a lot of already written code I have to migrate to the new architecture.

I spent actually 90% of my time (and 99% of my energy) building the installer, that is an achievement I am proud of.

The installer is very useful also standalone, not just for FatPhone but also for your development project. It allows to build and update a Fatwire Site from code and data stored on the filesyste, using only eclipse (without any  plugin!) and a browser. It can upload both Elements and Assets (only basic asset, for now), and I suspect it may be even more useful to the Fatwire Community than the FatPhone site itself. I am releasing it as open source as well as part of FatPhone, for now, but I wait for reactions from the community to see if it is worth to be packaged and improved.

Comments welcome.

Posted by msciab
30Jan2011