Archive for the '.net' Category

jQuery, Microsoft, and Nokia

Friday, October 3rd, 2008
jQuery logo

Microsoft is looking to make jQuery part of their official development platform. Their JavaScript offering today includes the ASP.NET Ajax Framework and they’re looking to expand it with the use of jQuery. This means that jQuery will be distributed with Visual Studio (which will include jQuery intellisense, snippets, examples, and documentation).

Additionally Microsoft will be developing additional controls, or widgets, to run on top of jQuery that will be easily deployable within your .NET applications. jQuery helpers will also be included in the server-side portion of .NET development (in addition to the existing helpers) providing complementary functions to existing ASP.NET AJAX capabilities.

Nokia is looking to use jQuery to develop applications for their WebKit-based Web Run-Time. The run-time is a stripped-down browser rendering engine that allows for easy, but powerful, application development. This means that jQuery will be distributed on all Nokia phones that include the web run-time.

Model-View-Controller

Thursday, July 31st, 2008
package net.gcmingati.jsp.beans;
import java.util.*;
public class RoomBean implements java.io.Serializable {
    private static int index = -1;
    private List staffNames;
	public static void main(String [] args)
	{
		RoomBean rb = new RoomBean();
		rb.getStaffNames();
	}
    public RoomBean() {
        initStaff();
    }
    public List getStaffNames() {
		for (int i=0; i<staffNames.size(); i++)
		{
			//return (String) staffNames.get(index);
			System.out.println((String) staffNames.get(i));
		}
        return staffNames;
    }
    private void initStaff() {
        staffNames = new ArrayList();
        staffNames.add("Gian Carlo Mingati");
        staffNames.add("Francesco D.");
        staffNames.add("Fabrizio L.");
    }
}

Un semplice esercizio con la sintassi Java; con questa classe (o JavaBean), visualizziamo gli elementi di un array (di stringhe) su una pagina JSP (in locale con Jakarta Tomcat) per mezzo dei tags JSTL e del linguaggio di espressione EL.

<jsp:useBean id="stanza" class="net.gcmingati.jsp.beans.RoomBean" />
<ul>
<c:forEach items="${stanza.staffNames}" var="selezione">
			<li>
					<c:out value="${selezione}"/>
			</li>
</c:forEach>
</ul>

E’ che sono stato abbastanza fortunato da poter seguire - obbligatoriamente - un corso di quattro settimane sulla programmazione Object-Oriented, ed in particolare su J2EE (Java Enterprise Edition), ed in particolare sull’utilizzo del framework Java che usiamo qui per sviluppare applicazioni; in partica è Struts 1.2 con una serie di plugins.

Un’esperienza che è giusto definire tale, che ha subito stimolato tutta una serie di considerazioni tra le quali, la più importante è che – con Java si può fare qualsiasi cosa.
Il bello é che comunque i concetti di base sono applicabili a qualsiasi linguaggio di programmazione e una volta che sai cosa vuoi ottenere e sai come scriverlo, il solo limite è la tua fantasia; insomma, passo molto volentieri dalla ricerca sul DOM scripting a quella su come creare applicazioni J2EE basate sul design-pattern Model-View-Controller.