Automatic Code Generation Utilities

Yeap. This is my first technical article. And a not very impressive one at that. While my really cool friends like Chuen Yang is dabbling with Google Maps and its GWT’s impressive development framework, and Herryanto Siatono is busy enjoying himself with Ruby and Rails… here I go writing some out-dated stuff on PHP. PHP? Thought that was passe. Its a little like preaching to the current software community about the advantages of COBOL for financial applications.

But what to do? Small company mah… so have to think of solutions that are easy to develop (so that it is easily outsourceable) and cheap to deploy.

Easy to develop
When we talk about ease of development, I am limited to either PHP or .NET technology. Java is definitely not something that a fresh grad can just pick up from reading a book (even if he is incredibly smart, he will probably get bored off going through the stacks of xml configurations… and yes… those configurations are not accessed through a friendly IDE like Microsoft Visual Studio).

Ruby n Rails is an incredibly RAPID development tool. Problem is, after reading Herryanto Siatono’s blog, I find that the entry level is too high. It appeals to only top-notch programmers, and we all know top-notch programmers like to do super cool projects like http://bookjetty.com, http://searchhouse.sg. Where got time for simple functional database applications?

So I am left with ASP or PHP.

Cheap to Deploy
Well, this second point wipes out .NET as an alternative. Microsoft .NET only runs on Windows server and that almost doubles the hosting costs. Such costs becomes even more real when our infrastructure knowledge must span across both the Windows and Linux domains. Boy… give me a break. Just linux alone gives me a big headache….

So that leaves me with PHP.

I had my first taste with PHP during my NUS days when everybody was rushing off to hack out some simple web application… and hoping it will somehow spin off into millions of dollars. We tried to do a discount site, somewhat like eJazz. Somehow, it did not turn out well…. as we had a superior competitor.

The idea was that all Singaporean’s love a good deal… and we will have a portal, consolidating all the discounts in Singapore. Thinking that all Singaporeans like a good bargains and cheap stuff we thought it will surely take off. (Of course, recently, I just realised that while most Singaporeans like a good bargain, not all like cheap stuff…. yeap… took me a long, long time to understand the concept of luxury goods in economics principle….)

A little digression….

Recently, I have been associating closely with a cha bo that values ‘quality’ over just plain old functionality and is willing to fork out a ‘premium’ for ‘quality’ products, i.e. especially things like: hair-cuts, facial, colouring toe nails, massages, handbags, shoes, blouses, skirts, bras n underwear, facial cleansers, hair conditioners, hair oil removal, hair * n face * and scrub *.

Sorry… I just had to add the *, ‘cos my limited brains cannot really remember the myriad of products used by our modern cha bos.

Also, not too recently, I did a website on a Singapore company selling facial care products. They are more of a boutique brand and they have a nice following over in the States. Somehow, his quality products worked well on his US customer base. When I spoke to him more about his business, he confided in me that for most beauty products, the packaging costs more than the actual product itself!

Ahem…. so when you look at a hundred + dollar facial product next time, just bear in mind that more than half of that is in its packaging. Gaze, marvel, fondle and enjoy the packaging, ‘cos the moment you take the real stuff out of its fanciful boxes, it loses half of its value. (Of course, that is bull shit. In my view, the product lost 95% of its value the minute it has served its wicked intention to deceive our modern cha bos into parting with their money).

Alas… the true breakdown of the costs of your beauty care product:

  • Advertising + Packaging + Promotions – 85%
  • R & D – 10%
  • Raw Materials – 5%

But honestly, this should come as no surprise as marketing and promotions are always a major part of the product costs. Was reading about “The Undercover Economist” where they explained how merchants actually increased profits by claiming the need to charge more as they were buying good quality beans from coffee makers at a premium (to avoid exploitation of the coffee makers).

As a majority of the costs of selling the coffee is in rental, marketing and promotion, a 50% rise in the price of the coffee has marginal effect on the costs of production. (If you read the Starbucks book on Howard Schultz you will know that the raw materials costs for 1 cup of Starbucks is just a few cents.) However, the coffee houses, because of its so called unexploited, premium coffee tries to chalk up a dollar more for the coffee… thus actually greatly increasing its profits margin.

I think its marketing in all its various forms and guises.

Now when I think of the Howard Schultz book on how he grew Starbucks, I get a little irritated. That guy is too much of a sales person and writes a little to mislead. He tries to play up on Starbucks loyalty in not raising the price of coffee even during the coffee brunch to imbue in us an impression that Starbucks care for the community and is willing to do so at an expense of it risking its profitability. However, some where else in the book, it mentions the real costs of the business (which is definitely not in the beans). So what the s*** is he talking about? Even if the beans prices triple, it will have marginal effect on its business….. But the way he cancels out his family outings etc… just to rush back to headquarters to discuss the issues in detail… and finally come out with a tough stand on putting our consumers in mind.

Bollocks. (Sorry.. incidentally, I have been in close proximity with cynical people… somehow it rubs off)
—–End of Diversion——-

Okay, back to PHP. For the business aspect, PHP does provide quite a lot of advantages. First, it has one of the largest and most well developed library of open source applications. This effectively means that we can just piece of bits and pieces of the application from the open source market and convert it into real value for the customer.

In fact, one of the very popular open source frameworks in which I am supporting is Joomla. It has a very powerful component framework that allows people to deploy extensions to it easily.

Another major problem of all software developers is to do up something which allows for backend update of database very easily. PHPMyAdmin is a very good tool for the technical developer.. however, it lacks the ease of use for the end user. Recently, while looking for a powerful database abstraction tool for PHP, I came across the popular adodb, and was shown PHPLens.

It looked good till I saw the pricing. A cool 1650 USD on a server level implementation. Hmmm… well it might not be too bad also if I can half multiple installations of the software on the same server as it does seem to provide the entire backend with some simple scripting.

But being a cheapo developer, I did some simple surfing and came out with a list of other products:

PHP Runner

Code Charge
15 Mar 2007 – Brings Code Charge Studio to Cebit 2007.

Code Smith Tools
Was trying to compile a list, until I saw a dedicated resource for Code Generation on the web. Really comprehensive discussion on Code Generation can be found at http://www.codegeneration.net So why re-invent the wheel?

Leave a Reply

You must be logged in to post a comment.