Nov 15, 2011

Martin Odersky levels of scala


Martin Odersky, who is the lead dev and creator of the scala language has identified the following levels of expertise for application programmers and library designer.



||||       Application Programmer    ||    Library Designer     ||     Orerall Scala Level  


1          Beginning(A1)                    ---------------                 Beginning                      

2          Intermediate(A2)                  Junior(L1)                     Intermediate                  

3          Expert(A3)                          Senior(L2)                     Advanced                      

4          ----------------                   Expert(L3)                      Expert                        

Nov 12, 2011

rails versus play anatomy

We create a simple play app, then a simple rails  app, and check the folders. With explication!!

To create a new rails application:

rails new app

 To create a new play! application:

play new app

Now let's the files and folders.

We start with rails:

gemfile file -> allow plugin dependencies needed for your rails app
rakefile file -> task from the command line
app/ folder -> contains the controllers, models and views for your app.
config/ folder -> configure your app runtime rules, routes, database, and other config involving the rails app
db/ folder -> show the current data base scheme and all your database migration
doc/ folder -> here we create the in-dept documentation for your app
lib/ folder ->extended modules or plugin for your application
log/ folder -> well, as the name suggest all you log application will be store here
publig/ folder -> contains all the  static page and the compile assets(stylesheets, js and images)
script/ folder -> script that start your application
test/ folder -> testing facilities :) Like unit testing, fixtures etc.
tmp/ folder -> temporary files
vendor/ folder -> third-party code

So that's rails structure. Now is time for play!*


*play with scala. We Using the 2.0 preview :)

Continue with Play!





app/ folder -> app sources. Contain: assets, controllers, models and vies
conf/ folder -> configuration files
public/ folder -> statis files (css, js, public files)
project/ folder -> sbt config files
lib/ folder -> unmanaged libraries dependencies
log/ folder -> standart log folders. All your logs app will be store here
target/ folder -> generated stuff. the compiled files for your app

In app folder we have:
app/
     /assets
              /stylesheets
              /javascripts
     /controllers
     /models
     /views
























Nov 11, 2011

default page in rails app

How to set de root page on a rails app?
As in root de index or de "/" page !

Pretty easy. Open the routes.rb from your app (/config) and enter: root :to=> "page#index, or root to: "page#index

that's all!

Nov 10, 2011

how to install play framework

In a world with so many web framework, with so many languages to work and create the big next twitter application, a new framework is like a new boy is born in the desert and we all hope to live alone for, let say ten years and then, we try it. This is a true story, in some remote places in Africa  teenagers are not register till the age of five years. the cruel reason is simple and in fact is honest for all the people around. There is an  illness that kill all the child's  and if they past the five years age, well they're gone life until the next war and a new malady. That a sad story but in fact is the reality in the world of web framework and new languages.
Play framework is truly the MVC for java language. In fact the resemblances between rails make you smile and ask yourself: "CakePHP'? :)
Stop!!! Too much words and nothing catchy
For play you need just java. And, as probably now java is all around the world. all the devices in this worlds has java or maybe a badge with java :)
- Go to play website   here
- then go to page download here
- unzip... and that's all
So, let's create a new application to see the power of the new framework. if you are using windows open CMD and navigate throw the folder where you unzip play, then run the command: play new hello_world
Will be ask to answer a silly question: the name of the application, do that and press enter! Nothing fantastic happen, just a new message and you must run play run hello if you want to see it in action. Do that, and enjoy, your application has been created and now is time to make some money, or not :D