Monday, February 28, 2011

Vagisil Wash Benefits

Illustration Friday - Layers - The Princess and the Peach

The Princess and the Peach / Princess and the Pea. DS
29
was not so bad this fable, it is true did not belong to my favorite fairy tales by Andersen, but it's nice listening to her in August as a child:) And it was also an idea for Illustration Friday In relation topicu "layers" (layers).
Finish / / somehow I'm very scanner scans; /

sketch





** *

Sunday, February 27, 2011

Epsom Salt Bath For Body Acne

Use Java as a dynamically typed programming language


Java is a statically typed programming language. This means that at the time of compilation the types of variables used in the program are known. This feature is one of the most powerful (if not the most powerful) thing, which gives a programmer warnings about bad code written before he runs it. This allows also to build powerful development environments like Eclipse with content assists and refactoring support. Unfortunately there is no rose without a thorn. Because of static typing a program code is a much bigger (types need to be specified in declarations, casting is necessarily) and sometimes simple problem becomes too complex. If you don't believe in this statement - check the core of JavaServer Pages technology (I mean scriptlets, without JSP tags) and see how much unnecessarily code you need to write just to print some attribute's field on the screen.



There is a lot of frameworks written for Java. Most of these frameworks use interfaces or abstract classes as a building block. Let me give an example: in order to create a HTTP servlet you need to create a new class extending the abstract HttpServlet class. This is simple, but... hmm... Do you really need to write a dedicated class for every action? It will not be better if you have multiple actions grouped together? Because of static typing you can't just do this easily, which of course does not mean that this is not possible. The solution is the reflection API bundled into JRE. You can execute methods, access or update fields etc. of objects of any type.



As a simple example what you can do with reflections check the following code of controller written in Egg Framework (full stack web framework being developed by me):


 
package controllers;

import static framework.GlobalHelpers.*;
import framework.Response;

public class SampleController {

public void newProduct() {
Product product = paramsAsBean(Product.class);
// TODO save product in db
}

public Response removeProduct() {
if (session("logged") == null) {
// not allowed
return renderText("Access denied");
}
// TODO remove product from db
return null;
}

}



The Egg Framework uses reflections extensively. There is no configuration (Convention over Configuration), no interfaces. Every class can be a controller, every class can be a form bean etc. (just plain old java objects - POJO). In this example Egg Framework uses request parameters sent to the server to decide which method (action) to invoke. Note that both methods have different signatures - not only the name, but the return type. But for Egg Framework it does not matter. If the action returns something not null then Egg Framework handles this, otherwise it runs normal processing. In this example I have used also static methods (check the import static statement on the top). Static imports are really great and can simplify your program dramatically.

So what the CONCLUSION for this post? That I think there is still a lot to to in Java libraries, frameworks and APIs design. Egg Framework is one of many examples how to make Java programs Prettier looks.

Monday, February 14, 2011

Boosting Estrogen Levels

Photo of the month - February

Hi! As each month, choose from their photos, "Photo of the month":) Photo is from the trial session, friend of Eve, the future Mrs. stylist:) All the session has been and will be inspired by the style of pin-up girl (and who knows whether or not Burlesques) more information on this subject coming soon! I hope you like:)

Here they! : D
U can see: Arianna -chan.DeviantArt



Saturday, February 12, 2011

Antena Satelite/recipes

Illustration Friday - Sweater - Daily Sketch 28

S in e a t e r for Illustration Friday

* Meow *



***



Thursday, February 10, 2011

Pirates Digital Playhouse Watch

Illustration Friday - Reverse - Daily Sketch 27

Illustration for Illustration Friday

: 3


Enjoy!