@VladSun, I'm developing similar software. Here's a screenie:
http://ioj.com/v/c4qgx
My views are not server-side, but client-side. This is my hobby project, a web version of Windows interface. I have made Window, Textbox, Textarea, Radiobox, Checkbox, Tabs, Panels, Labels and Scrollbars so far. Next I'm going to build up editable select boxes. The HTML 5 & CSS 3 is all built up with JS. All those shadows, corners, gradients, glows are made with CSS. There's only one picture texture.png which gives a texture to graphics and icons/buttons of course.
The way it works in principle is that the application loads the main component, which in turn loads each required subcomponents, and this all is done based on the user's permissions via AJAX. For example, if he can edit blog posts, then load blog window module that and all required components for it. PHP does not handle views at all, it returns JSON only. In my system, it goes like User <-> View <-> Controller <-> Model. Controller handles logic, validation, etc. Model handles the retrieval or saving of data.
The app fails miserably if you don't have JS. However, that's my requirement, I'm not working on a web site, I'm working on a web application. It still works on IE and others. It degrades gracefully. This also applies to HTML and CSS. If you are using IE, you won't see nice gradients there. I've built a browser capability class which finds out what the browser is capable of
displaying, and based on that I display things differently. So, I'm not doing user agent targeting of any sort.
The way things work in my app right now is that when you open a control panel and you add a new user account, for instance, it will send an AJAX request, and based on its success, it will directly write to the View. I have no duplicate view code. And if you remove a user account, and the removal failed, it would make the user account field to go red with an error sign and a message containing useful information.
Third-parties are allowed to create modules (which runs as applications = windows). Here's an example code that will create a window:
Code: Select all
my-project-namespace-here.createApplication(
{
folder: 'test',
title: 'Control Center',
iconTaskbar: 'home.png',
iconWindow: 'home_small.png',
width: 256,
height: 320,
minWidth: 128,
minHeight: 32,
maxWidth: 320,
maxHeight: 320,
singleton: false,
resizable: true,
showInTaskbar: true,
showCloseButton: true,
showMaximizeRestoreButton: true,
showMinimizeButton: true,
showIcon: true,
content:
[
{type: 'checkbox', value: 'Sample value', x: 64, y: 48, width: 256},
{type: 'checkbox', value: 'Another', x: 64, y: 96, width: 256},
{type: 'checkbox', value: 'Yet another one', x: 64, y: 240, width: 256}
]
});
You can setup properties like Parent to make its parent not-selectable while the window is open, and lots of other cool stuff. All windows are kill-able through Task Manager and my friend already made the first virus for my web-Windows hehe.
I also like ExtJS, but I wanted to do something on myself (to educate myself, to get experience and show off skills, etc). Anyway, my point was that a web application does not always need to be SEO friendly nor does it have to be non-JS compatible.