March 30, 2012

JQuery Chaning

One of the really interesting things about JQuery is the chaining mechanism. It enables you to write actions after one another in a chain of actions, a bit unlike many other languages handles thins. JQuery provides chaining feature to call multiple method calls in single statement.

For instance:
$('#Table1').fadeIn().fadeOut();

will first make  #Table1 fade in and then fade out, creating an animation.  The chain makes consecutive actions show up in relation also to when they will be executed and that gives a more readable code.

This is based on the design pattern where method calls return a JQuery object so that once the method is executed it will also return a JQuery-wrapped object that has all the other methods of JQuery available. In that case, we must therefore consider that JQuery selectors are not giving us the table object but a JQuery-wrapped table object as is the case in this example. This can hide methods available in the DO on for instance the table objects since the selector doesn't provide us with the table object but the JQuery object.

To get the Raw DOM element inside the JQuery element you call: 

$("table").get(0); 
or
$("table")[0]; 
 
This will give you access to that object and therefore also access to methods containd in the DOM objekt.



March 29, 2012

LESSCSS


An interesting tool for you to look at it LESSCSS that simplifies the work you need to do with styling and introduces some useful functionalities when developing a web application. CSS has some designs that makes it a little difficult at times to work with and LESSCSS helps you make more readable code. It is not really a client-side framework but it can contain valuable additions to your project and make life a little easier for you if you are working actively with CSS. 

As an interesting example LESSCSS adds functions and operators that can be used to create styles like this mix example where a color is defined by mixing two colors.
mix(@color1, @color2);    // return a mix of @color1 and @color2

March 21, 2012

More on SVG

Rafaël is a nice SVG libraray as an atelrative for the mode traditionl JavasScript frameworks such as JQuery, Dojo, Mootools and so on. Another alterantive to look at is: svgweb.

Also if you want to work a little with SVG but don't want to do your entire project in it you can look to
Polymap for inspiration of a programmable component to add.

PHP buildsystem

For deployment and other general build issues with PHP a system to look into is  Phing, a PHP project build system or build tool based on  Apache Ant.



March 20, 2012

How to do a bloog in 15 minutes.

Many frameworks have a  "How to do a blogg in 15 minutes" screencast or soemone has made one that demonstrates the ease with which this kind of data is produced.

For Ruby on Rails
Codeigniter
Django

March 16, 2012

PHP Frameworks

PHP has for a long time been a strong web langauge. It is a messy language but a good framework can make it work for more large scale development.

Frameworks alike Codeigniter, CakePHP, Symphoyn, Yii, Zend, PHPDevShellKohana, Akelos are examples of frameworks. Melt is a framework created by some guys from Linköping.

Among these opinionas about what is best seems to vary though for instance codeigniter gest praise for beeing easy and in that

Zend is sometimes regarded more as a collection of libraries than a framework and doesn't have native support for ORM so if Zend is an alterantive for you, look here for more information about how to get that in:



If you want to work in PHP your should look into all the frameworks to see what to use.

An alterantive for a framework si also to address ORM using a system like Doctrine which is a PHP -library for database access in ORM format






JQuery Dominans


For several Years now JQuery has been the dominating JavaScript framework. Even Microsoft did recommend using JQuery together with ASP.NET MVC instead of using the built in ASP.NET components. 

One of the really good things about JQuery is the ability to create themed JQuery downloads online and therefore choose more freely. 

The Framework do to things: provide high-level access to things like Aajax-calls and the creation of components, and add transactions and animations for moving dialogues and creating more interactive designs. 

The original frameworks where prototype and script.tac.lous. In the beginning the speed of JavasScript frameworks was very poor and Flash really had nothing to fear from JavaScript which doesn’t have any real time scale and things animate as the process is able. Now, these things are being introduced into CSS instead and in the future it is possible that the animation schemes of JavaScript libraries end up there and that the effect will be even better or that the JavaScript frameworks will lose this part as their defining feature. Perhaps this will reduce the importance of the JavaScript frameworks because CSS is really getting even more complete.

March 13, 2012

Welcome ot the TDDD27 blogg


Here I will post things about web programming, frameworks, tools and other things relevant to members of the course. This is the main forum for lectures and provide insights into web programming in the general case while you yourself focus on one technology of your choice in this vast ocean of technology.