March 9, 2007 at 7:14 pm
· Filed under Tech, Javeline
Positioning
There are many specialist who are a star at positioning using CSS. I’m one of them. Despite that, positioning elements in a GUI is a lot of work every time. Javeline Platform has two different ways to position elements which makes my life a lot easier.
Anchoring
fig 2. Anchoring.
As fig. 2 illustrates, when using anchoring you specify how much pixels any side of the component is away from the side of its parent. Each side can be positioned arbitrarily. I can even use expressions in any of the four positions. For example I can set the left position to “50%+5″, a HTML-er’s dream come true. When the parent is resized the element in the parent is resized accordingly.
I use alignment when I want to create a GUI that has elements covering the entire plane. See fig 3. for an example. Lets say the left component is a tree, the top-right a datagrid and the bottom a text component. A basic Outlook interface.
Use the align property to set the position together with the width and height properties.
Sets the position to which the component is aligned.
align-margin
The margin between the components
align-splitter
Boolean to add a splitter between the components
min-width
Minimal width of the component
min-height
Minimal height of the component
There are several other alignment properties for more advanced layouts. These are outside the scope of this article.
Grid Placement
In a lot of cases it’s necessary to create a grid of components. For instance when displaying a form. In XHTML it is common to use a table element around the components. Platform has a different approach using the grid attribute:
This example creates a container with four columns each with a width of 25%. It has a margin of 10px from the sides. The space between the components is 2px and the height of each component is 15px.
I have already sent two emails to the Javeline team via the “info@javeline.nl” email
address, but unfortunately I got no response
So I am contacting You directly here via this blog entry; because I have fallen in love with Your layout engine almost immediately ! I am currently doing some research with regard to layout in the native contemporary browsers, and Your approach seems to be really unique ! I have played around with it a little bit and am so impressed right now that I want to leverage Your layout engine ! I know that I can use the packager to extract only parts out of all the Javeline SDK stuff; but I couldn’t make it extract the layout parts … in fact I couldn’t get it to work at all …
I am also very much excited about Javeline in its whole glory, but this particular blog comment shall address the issue of leveraging Your layout engine separately. Is there a technical way to do it ? And what about licensing then ? Or do You know of other layout engines for browsers which are as capable as Yours seems to be ?
I just found your e-mail. It got lost in the spam box somehow. You will get a reply from me on that. It is possible to extract the layout engine using the packager. For what purpose would you like to use it? Please register to the internals mailinglist at http://developer.javeline.net/mailinglists.php and sent your answers there so the community can follow them as well.
Ajax applications connect to a backend. Most popular nowadays is to use REST to connect to a backend. This backend can be written in PHP, Perl, ASP, JSP or any other language. It’s the responsibility of that language to connect to a database using jdbc.
In Javeline PlatForm you would do something like this:
[…] early version of Javeline PlatForm and up untill that moment I had only positioned elements using anchoring. I did remember a nice feature that Visual Basic had, where I could align an element to one of the […]