Recipe for PHP Projects

1. Design the database on paper, code it in Doctrine PHP class files, start with the database first, it gives form for the function to fill out
2. Auto-generate the database from the Doctrine PHP class files
3. Bring in Zend Framework, code to its standards, eg Zend Search Lucene
4. Use Doctrine to access database in cases of insert, update or delete. For cases of complex select statements such as search or displaying tabular data then use Zend_DB
5. For AJAX on normal web pages use JQuery to load HTML into DIV’s and all the JQuery extensions that are out there
6. For rich client, use Google Web Toolkit or Adobe Spry or Adobe FLEX

Poison

You know that problem you have, whatever it is, your problem X, I guess its because your mother fed you with a baby bottle full of toxins. Whatever else you don’t know won’t bother you today.

How to make a Flying Castle

At the end of Miyazaki’s movie Howl’s Moving Castle, the castle flys in the air, so I was wondering how could I make a flying castle using today’s or tomorrow’s technology, would be a nice way to get around in style.

Firstly you a lot of energy in a lightweight form, Materials that directly convert radiation into electricity could produce a new era of spacecraft and even Earth-based vehicles powered by high-powered nuclear batteries … The materials they are testing would extract up to 20 times more power from radioactive decay than thermoelectric materials. Also we know that radioactive decay is going to produce a lot more energy per weight of material.

It would be nice to be able to control the release of the energy, so we will use the not yet proven triggered decay of metastable isomers Reports of triggered decay of the 17*Hf isomer induced by x-rays delivered by a dental x-ray machine have been made (PDF). This isn’t necessary but is nice.

Then we need to convert the electricity into a vertical lift. Well this area is very unproven, but the most likly the EMDrive will work. An alternative is rotating superconductor The authors conjectured earlier, that in addition to this so-called London moment, also a large gravitomagnetic field should appear to explain an apparent mass increase of Niobium Cooper-pairs. This phenomenon was indeed observed and induced acceleration fields outside the superconductor in the order of about 10^-4 g were found.

Thats it basically, the combination of those should do it.

Faith in Sin

I place my faith in the sinful and selfish nature of people.

Now to you, this sounds bad, firstly you assume that I think everyone is evil and bad, well I don’t exactly, I think everyone is naturally selfish and it doesn’t matter where they are or what they are doing, religious or not. Being selfish is good as it keeps you alive, keeps you engaged with the world, satisfys your hunger and your needs. I don’t say it should be the goal of living or the way things should be, I just suggest its the natural order when people are left to their own devices.
Secondly you are thinking, thats very negative, this guy Philip has a very bad view on the world, people should think positively in the face of things no matter what. However, I try to have a realistic view on the world, is it wrong? Perhaps its wrong to share it with others.

Lets consider a recent news article, Italian woman artist who was hitch-hiking to the Middle East dressed as a bride to promote world peace has been found murdered in Turkey. She put her faith in the kindness of people and ended up dead. Perhaps it would have been better for her to put her faith in the selfish nature of people and used money to get by and maintain her security while promoting peace? Maybe she wouldn’t be dead, or is this natural selection in progress, so we are only left with selfish people again.

One of the ways I place my faith in selfish people is I know when they open the door downstairs to this block of flats, they all push in the closest place to their hands, you can see all the hand marks all over the door. So I push near the top and don’t get as many germs on my hand which could cause sickness such as cold or flu.

Also people always want to go first, I want to go last, why? Lets say your waiting for the elevator, and the door opens and the typical person pushes to be in the elevator first, go ahead I say. I try to be last. They go in and either go to the back or most normally go to the buttons and start pressing them. Also good for me in either case, one case they operate the doors without me doing anything or I get out first in the case they go to the back. Be last I say, its much better.

I’m not harming anyone, I just know they want to be first and I know that in their selfish needs I can find some benifit even in small issues. If you scale this up to more important issues, advertisers place great faith in your selfish desire.

So you can see, selfish people push ahead of the pack, they take the tackles first and the last people have a better time in general (unless your in mainland China and your waiting for the bus, you really do need to be selfish).

Links

Zend Framework action helpers, file upload, tutorial updated for 1.5, LinQ for PHP, PHP image rotation, htmLawed and HTMLPurifier, Zend Framework Map. java DB.
SimpleDB vs CouchDB.
Scala option monad, scalacheck, Function Currying in Scala. Free textures. Coconut Macaroon Pancakes Recipe
First steps in CRX Quickstart one 15 helpful WordPress plugins for the savvy user, Design Resources, Hong Kong royalty free, Photos into Panoramas with Free Software autopano, Free Fiction online, wordpress automatic upgrade plugin, free vector graphics, photoshop brushes, Cushy CMS.

Programming links

Phorm photo gallery, TypeRoom is a great idea for a CMS. 25 books for web designers, Flex websites, make CSS simple, Java technology map, resize images in PHP, hosting java applications is hard, how to get openID, Will-Power, convert paper documents into Ipaper, 39 creative flash designs, open source FLEX, icon sets, unit testing databases, GQuery, javascript date functions, spring web services 1.5, OpenCalais automatic tagging, Voluntary Economies
, firefox 3.

Zend Framework example project, acl, complex web pages, forms, pastebin example, controllers, module, zend layout and view webinar.

If you were going to make a new software application, its clear that providing an API for others to use would be useful. See here.

Scala actors, type classes, why scala, learn.

BookletCreator - is a free online tool that allows to create a booklet from a PDF document. It reorders pages so that after printing and folding the pages you get a small book.

Paper cameras really do take photos if you put film in them.

Links

robot blocks I would love to play with those, Debugging Javascript, Flash 3D and physics, scalable hosting on EC2, photoshop tutorials, css properties, grunge fonts, nice blog design, Compass/Lucene Terracotta Integration, load an image in FLEX, how to get OpenID, swf loader in FLEX, GQuery is JQuery in GWT, all ajax platforms, YUI book, review of open source CMS. Enough for now.

Final CMS decision

Here is the attractor for the CMS.

IntelliJ editor, TestNG, Jude Community, CheckStyle/PMD, Jasypt, Java date and time (joda-time.sourceforge.net), Spring Framework, Hibernate mysql, Sling content store, Jetty Server, Maven build, Apache commons, Scala LiftWeb, GitHub, MG4J, Spry (for CMS), JQuery, HTML, Blueprint.

Here are the undecided items.

Java workflow engine (http://java-source.net/open-source/workflow-engines).
Whatever is unknown I don’t know.

It sounds complex but its all about managing complexity.

Software links

Maven
Must have tools for Java developer
Java utilitys
What is Terracotta?
Spring Java configuration
Make anything and sell it online
Where to look for web work
Reputation management
If your a PHP programmer you can run the same code in Javascript?
Design patterns in Scala
Regular expression generator
Microformats
Best flex sites

Java Programming and CMS

One of the problems with the Java programming language is there is just too many libraries to choose from.
If your going to do JSP, then… so many ways it can be done, Struts, RichFaces, Ajax4JSF, so many more, you cannot compare rationally. The bigger problem is what is the set of Java libraries you should be programming in.

Well my goal is simply to produce an Open Source CMS which I plan to release under LGPL. The primary language of the CMS is Scala in the LiftWeb environment, why? Since there is not yet a CMS in LiftWeb and so many people are interested in Scala, it can be a learning environment for those people. Also I will retain copyright and distribute it through my new I.T. company to help give positive press for it.

There will be different layers, the UI layer will be a combination of JQuery, HTML, Spry Framework and whatever LiftWeb and Scala can output.
The logic, control and presentation layer will be Scala and LiftWeb.
The services layer will be Java providing services to Scala and LiftWeb.
The database layer will be MySql combined with Sling content store.

The platform should be Tomcat or Jetty (keep it simple, not J2EE, we are a CMS not a Enterprise project).
Use Hibernate for database access.
Use Spring as well.
Use Apache commons.
Sling will be the content store.
Drools for business rules engine.
OSWorkflow for workflow.
Quartz for job schedule.
Clickstream to track users.
Maybe OFBiz, but I don’t understand it yet.
OSCache?
Compass for search or MG4J.
(I’ll keep searching for the set of Java libraries which are harmonious together)

Use Maven for the builds.
Use ActiveMQ for message Queue.
Use Scala for CMS logic and LiftWeb for CMS programming environment. Scala can call Java code easily, so it will access the database through Hibernate. By doing this it will keep a distance from database.
There will be a core of Java code which does some functonality and Scala code which calls Java code.

Why use Scala and LiftWeb? I could be using PHP and Zend Framework, its so nice, however there are many PHP CMS’s out there. My feeling is that its not worth the investment to attempt to competed in that area. There is a set of people who want to learn Scala and LiftWeb so the project can also assist them in learning in this area since its an Open Source project. Scala is also best of breed of programming languages, at a high level of abstraction. All control for the CMS should reside in Scala while services which assist the CMS should reside in Java.

Also since many people don’t have a Java Servlet stack, I’ll provide a PHP client program which can allow them to run the CMS on their LAMP stack or even ASP DOT NET stack (install PHP) and it calls the Scala server through web service calls. The PHP client will use Zend Framework.
The PHP client requires that the CMS server exists as a remote service, so this is what we call a hosted solution.
Perhaps I will provide the hosted solution for a minimal fee or add advertising to it.

Full control must reside in the LiftWeb and Scala language while Java librarys provides the environment in which it resides. Any plugins can be written purely in Scala. Why? I expect Scala programmers will be attracted to a CMS platform which can help them be productive and I agree with everything LiftWeb is doing so far from a technical point of view. I believe Scala programming could be much more productive than PHP programming and DOT NET programming. Java programming for the web is stuck in too many librarys and complex platforms while Scala and LiftWeb are new babies which can have a very nice CMS built on top to give one powerful platform. If the right abstractions are provided in Scala, then it can be very effective.

Now the rational is described its just a matter of slow steady progress towards that goal with baby steps and then to release early and get people involved.