Mar 12

one-size-fit-allI had a very interesting” discussion with a colleage about an API that he would like to expose through REST. This API is suppose to check a SQL where clause. He suggested to expose it as REST as we are currently working on some REST engine for our backend.

This option appeared as the simplest and quickest….and I like simplicity. But simplicity is much more than a low number of LOC. In our case, the number was low thanks to the support of a REST SDK. To check about simplicity, the usage of third party should be taken into account. So, I get ride of the false argument about simplicity. The argument that the implementation is quick todo is also NEVER an…argument, this is just a fact.

Without these argument, the discussion start to be “interseting” …I erejct the idea to implement it as a REST API as REST seams not to fit at all in this picture. My argument was “this is a service, not a resource”. I get the classic “everything can be a resource, this is just a question of point of view”. You can read this excellent post from Cragg Ducan.

It does not make sense to get the collection (or list) of valid SQL, it neither makes sense to delete or put/post on a SqlValidation resource.

Then I tries to find some obvious example of service that just can’t fit into a REST paradigm. My goal was to demonstrate that REST is not “one-size-fit-all” paradigm. I can’t rely on the fact that some verbs as DELETE or PUT will not work as this is already often the case. But, I can rely on the fact that the GET is not wortking. The fundamental requirment for a GET is to be idempotent, you can call it as much as you want, you should not have any border effect (from the caller perspective) and the result should be the same. Do you see any example ? …GET http://xxx/yyy/Time which should return the current time. This is a very famous service…which can’t be deserved through a REST API.

So each time, someone tell you that REST fit all, just ask him to impelment a REST API that provide the current time…that does not fit.

I’m eprsonnaly enthousiast about REST, especially for the simplicity it brings, but it does not fit all !!

Feb 16

I get a PRS-505 for Xmas. First of all, this reader is very good and I’m very pleased with it. In France, the “official” book online provider is www.fnac.com. Their online catalog is really not of interest: only 3000 references, and all in very strange/weird categories like cooking for example. I’m not a fan of cook books andfor example on science fiction they have only 3 references…yes THREE.

So I decided to buy some books somewhere else: NumiLog. I found a science fiction serie of books. I decided to buy 2 of them. You’ve notice how easy it is to buy something…it occured like a charme. I was just surprise not to see a download starting at the end of the purchase process. So I surf a little bit on the site and found that I have to explicitely doanload the books that I have bought. This is where it starts to spin out.

I was asked for 1 or 2 PID. The PID is the ID of the reader, and the PRS-505 has …. no PID!!!! In fact the MobyPocket format is based on a kind of DRM. To read them on your reader, you have to remove the DRM.

This post is for people that have legally bought books with mobypocket format, and would like to read them on their PRS-505. You have to acquire legaly the book, this post is not for these guys that does not support book industry.

To remove the DRM, I use a (2 in fact) python script that will remove a fake DRM (you are not able to download without providing a DRM).

So first, you need to get a PID; I did not tried with a totally fake one, I simply installed the moby pocket reader and grab its PID that you can found in its About window. Then you need to install python language.

Create a temporary folder, let’s say c:\mobypocket. Download 4DeDRMfiles.zip with your favorit torrent client. Extract content in c:\mobypocket. Create an ‘input’ folder, and an ‘ouput’: c:\mobypocket\input and c:\mobypocket\output. The python scripts have to be renamed for simplicity. rename “Python Script for MobiDeDRM.py 0.01.txt”, rename it as MobiDeDRM-0.01.py, and ”Python Script for MobiDeDRM.py 0.02.txt” as MobiDeDRM-0.02.py. You may not need the 2 scripts, but in my case, one script was ok to remove DRM on a file but not the otnher script, and vice-versa for another file.

Now run, the script to remove the scripte like this:

 (click on image to enlarge)

I’ve hidden my PID, you should use your. If you get errors, try the other script: MobiDeDRM-0.02.py.

Now, in the output folder, you get your acquired books without DRM and you will enjoy them on your reader.

Feb 16

I should add “versus backend features, especially for an enterprise software”.

Have a look at Ayende work around NHProf. In a recent post he describe a change he will have to implement. I’ve no doubt he already made this significant change quite rapidely, but such change is usually heavy. You can check the number of line of code in the client vs backend there. So, technical requirement/constraints may force you to take a radical approach for the UI which induce significant extra work…especially as (from a performance perspercitve):

UI operations are expensive, while backend operations tends to be cheap.

From a requirement perpective also, UI can be very expensive to develop. Usually, customers (internal or not) are suddenly very creative when the “see” the UI of a feature and add a lot of new requirements…or changes. That’s why products like Balsamiq Mockups are really useful, to avoid useless iterations.

In the context of an enterprise software the ROI of UI becomes terribly low. The first reason is that usually, there is a need for multiple clients that are totally different: business intelligence, RIA, outlook integration, RSS/ATOPM integration, fat client, web client. This makes the development on a single client a very small piece of the entire picture, which reduce the ROI. 

The second reason, is that UI technology and trends are evolving a lot (RIA, Web 2.0…etc). At the opposite, the business logic encompassed into your enterprise software is tighted to the “business” which evolve at a slower rate. In this context, adding a new “business feature” has touthands more value/ROI than a UI feature.

In my opinion:

  • UI technology should support rapide development to be able to follow trends and technology evolutions without exploding investments,
  • backend technology should be selected with a long term vision,
  • do not put any business logic in UI, simply allow projections of backend business logic in the front end.
Jan 15

I fully agree with Rockford Lhokta when says in his Appliaction Architecture Guide 2.0 post :

Architecture, in my view, is primarily about restricting options.

Or to put it another way, it is about making a set of high level, often difficult, choices up front. The result of those choices is to restrict the options available for the design and construction of a system, because the choices place a set of constraints and restrictions around what is allowed.

Dec 10

According to typealyzer, I (or my blog) am a member of the INTP:

Dec 10

Sometimes important decisions are made in agreement because there is undetected misunderstanding which makes the decision fulfilling the requirement. Double check in this case is often useful.

I’m working currently on some modeling exercise. The question has been raised about the support for the model: UML or a real database? We agree (including me) on using the database. My understanding was that we will use a real database using the model as structure.

Finally we have a database with 3 tables: Entities, Relationships, Attributes … this is far from what I thought !!

 

Dec 08

You can get a description there. This released was initialy planned for begining of 2007 and is finally out.

JBossAS 5 provides a healthy foundation and the most
advanced and fully extensible, cross component model, aspect integration, server runtime environment.

Dec 08


In this article, we learn that we can get a totally unlock Android G1 phone, i.e: works on any networks.

The Android Dev Phone 1 is available exclusively to those who register as developers on the Android Market site, after paying the $25 registration fee (seriously Google, do you really need the money?). After they have your details, you can order the phone for $399 and have a working, customizable Android G1 handset sent to you wherever you may be in the world, and free of charge if you live Stateside.
 


Nov 24

Agile sounds on the decline … in the practice as mass adopte it wrongly. This is what are saying James Shore in this post,Jonathan Kohls in this post. I think the Agile bubble start to explose, the question is: will it follow the hype curve that I described in that post.

Nov 11

G2One is the software company delivering open source projects Grails and Groovy. This company is made of 6 java experts. YOçu can find all the details in this article.

SpringSource expect to integrate Grails in dm server, the OSGi paltform.

Ruby on Rails has now a serioous competitor.