Posts Tagged ‘Learn’

SQL Server 2005 Tools

Monday, April 6th, 2009

Inside SQL Server 2005 you can find the following tools:

Database Services: Includes the database engine and components of search. The database engine is the core of SQL Server. Replication increases the availability of data among various databases, allowing to scale the workload of each server. The search query language allows level within the data stored in a database.

Analysis Services: Provides functionality for OLAP and Data Mining aimed at Business Intelligence applications. Analysis Services allows you to add data from multiple sources, including relational databases and data work in several ways.

Data Integration Services: Delivery data transformation and integration solutions to extract and process data from multiple sources and directions to one or more destinations. This link allows data from multiple sources and load data in the Data Warehouse.

Notification Services: includes a notification engine and components for customers to create and send personalized messages each time an event occurs. The notifications can be sent to wireless devices like cell phones or PDA’s, or Mail Messenger accounts.

Reporting Services: includes Report Manager and Report Server to provide a complete platform for creating, managing and distributing reports. Report Server is built on standard IIS and technology. NET Framework, allowing lso combine benefits of SQL Server and IIS for hosting and processing reports.

Service Broker: Allows creation of queues and messaging as the core of the database. Queues can be used to stack work, consultations and other applications, and implemented as resources become available. Messaging allows applications that use databases to communicate with them.

Cheers!!!

Create Drop Down List Options From Enum

Thursday, April 2nd, 2009

To view the values of an enumeration’s type (enum) to a DropdownList (or other controls with a DataSource property available) is sufficient to bind the following code:

Here’s an example with its own enum (of course also works with system types)

?View Code CSHARP
public enum CountryList
{
Germany = 1,
India = 2,
Japan = 3,
UAE = 4,
USA = 5
}
 
DropdownList1.DataSource = System.Enum.GetValues(typeof(CountryList));

Now, whenever you want to get to The Value of Even enum () method of the enum is useful to get under the VALUE of enum sees below snippet will helpful to
you.

?View Code CSHARP
int intCountry = Convert.ToInt32(System.Enum.Parse(typeof(CountryList), DropdownList1.SelectedItem.ToString());

Read More…

Happy Programming!!

?? Operator (C#)

Thursday, April 2nd, 2009

The ?? operator returns the left-hand operand if it is not null, or else it returns the right operand.
For example:

?View Code CSHARP
int? x = null;
...
// y = x, unless x is null, in which case y = -1.
int y = x ?? -1;

The ?? operator also works with reference types:

?View Code CSHARP
//message = param, unless param is null
//in which case message = "No message"
string message = param ?? "No message";

Source: Click Here…

Intro To Windows Presentation Foundation (WPF)

Wednesday, March 25th, 2009

Windows Presentation Foundation (WPF) is the user interface subsystem which is included in .NET Framework 3.0. WPF clearly distinguishes user interface and logic offers the programming model which is consistent. WPF application can arrange and execute on the web browser it executes not only in the desktop. With WPF, user interface, the drawing and vector graphics of 2D and 3D object can utilize the expression technique such as raster graphics, animation, sound and playback etc of animated picture uniformly.
a
.NET Framework 3.0 can be preinstalled in Windows, Vista even with Windows XP SP2 and Windows Server 2003 can utilize.

Features

The following are some of the features of WPF.

Graphics

The window is included, all graphics are drawn through Direct3D.

Because of this, it is possible to utilize high-level graphics with single method.

It becomes possible to leave drawing processing to GPU on the video card, by drawing through Direct3D. This CPU would be to reduce the load.

Vector graphics is supported. This allows scaling without loss.

Rendering and interaction of the 3D model are supported.

Arrangement

WPF can arrange not only usual stand alone application, XAML browser application (XBAP) as.

Stand alone application is the application which is arranged on the local computer ClickOnce and Microsoft Windows Installer (MSI) and like by the installer.

XAML browser application (XBAP) it is the application which the host is done with the web browser of Internet Explorer and the like. Function of access and WPF to the computer resource is restricted part.

Interoperability

WPF offers the interoperation function of Win32. To utilize WPF from inside the cord/code of Win321, it is possible to utilize the cord/code of Win32 from WPF.

Also the interoperation of Windows Forms is possible, (ElementHost and WindowsFormsHost class).

Multimedia

WPF offers basic 2D graphic function such as brush, pen, geometric figure and deformation.

The 3D function which is offered with WPF is the subset of Direct3D. But, user interface (UI) and the like is possible with WPF from to utilize closely to the element. UI of 3D, the document and the media etc become possible with this.

The general picture format is supported.

The animated picture of WMV, MPEG and the AVI format is supported.

Time based animation is supported. This does not depend on the performance of the system and maintains the speed of animation uniformly.

The text rendering which utilizes ClearType is supported. In addition, it supports also the function of the OpenType font.

Data Binding

WPF supports the data binding of 3 types which are shown next.

one time: The client ignores the update on the server.

one way: The client has the authority of write inhibit vis-a-vis the data.

two way: The client has reading and entry both authority.

User Interface

The basic installation control such as the button, the menu and the list box etc is offered.

As the powerful point of WPF, it is possible to separate logic and interface completely.

Related Item

Microsoft Silverlight
Adobe Integrated Runtime

External link

Validate: Username, Email Id, Phone No, Zip Code & URL In 5 Languages(JS, C#.Net, VB.Net, JAVA & PHP)

Monday, March 23rd, 2009

Validate of Username, Email Id, Phone No, Zip/Postal Code & URL In Javascript, C#.Net, VB.Net, JAVA & PHP !

1. Validate username: Validate alpha numeric values
2. Validate email addresses : example@domain.com
3. Validate Phone numbers: Validate US phone number eg: 123-456-7890
4. Validate Zip/Postal Codes: Validate US Zip/Postal Code eg: 12345-6789
5. Validate Domain Name eg: http://live.com

Validate username: Validate alpha numeric values

?View Code JAVASCRIPT
function is_valid_username(str_username)
{
 var filter = /^([a-zA-Z\s0-9]*)$/;
 if (!filter.test(str_username))
 {
 alert(’Wrong username format.’);
 }
 else
 {
 alert('Username format is ok.')
 }
 return false;
}
?View Code CSHARP
 using System.Text.RegularExpressions;
 
 private void is_valid_username(string str_username)
 {
 Regex matchRegex = new Regex(@"^[a-zA-Z0-9_]{3,16}$");
 MatchCollection matches  = matchRegex.Matches(str_username);
 if(matches.Count==0)
 {
 Response.Write("Wrong username format."); // In Webserver
 //MessageBox.Show("Wrong username format."); //In Windows Form
 }
 else
 {
 Response.Write("Username format is ok."); // In Webserver
 //MessageBox.Show("Username format is ok."); //In Windows Form
 }
 }
Imports System.Text.RegularExpressions
 
Private Sub is_valid_username(ByVal str_username As String)
    Dim matchRegex As New Regex("^[a-zA-Z0-9_]{3,16}$")
    Dim matches As MatchCollection = matchRegex.Matches(str_username)
    If matches.Count = 0 Then
        Response.Write("Wrong username format.") ' In Webserver
        'MessageBox.Show("Wrong username format."); 'In Windows Form
    Else
        Response.Write("Username format is ok.")    ' In Webserver
        'MessageBox.Show("Username format is ok."); 'In Windows Form
    End If
End Sub
import java.util.regex.*;
 
public class is_valid_username
{
 public static void main(String str_username)
 {
 Pattern p=Pattern.compile("^[A-Za-z0-9]+$");
 Matcher m=p.matcher(str_username);
 boolean matchFound = m.matches();
 if(matchFound)
 {
 System.out.println("Username format is ok.");
 }
 else
 {
 System.out.println("Wrong username format.");
 }
 }
}
Function is_valid_username($str_username)
{
 if (preg_match('/^[a-z\d_]{5,20}$/i',$str_username))
 {
     echo "Username format is ok.";
 }
 else
 {
     echo "Wrong username format.";
 }
}

Validate email addresses : example@domain.com

?View Code JAVASCRIPT
function is_valid_email(str_email_id)
{
 var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 if (!filter.test(str_email_id))
 {
 alert(’Wrong email address format.’);
 }
 else
 {
 alert('Email address format is ok.')
 }
 return false;
}
?View Code CSHARP
 using System.Text.RegularExpressions;
 private void is_valid_email(string email_id)
 {
 Regex matchRegex = new Regex(@"[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-\.]+\.[a-zA-Z]{2,5}");
 MatchCollection matches  = matchRegex.Matches(email_id);
 if(matches.Count==0)
 {
 Response.Write("Wrong email address format."); // In Webserver
 //MessageBox.Show("Wrong email address format."); //In Windows Form
 }
 else
 {
 Response.Write("Email address format is ok."); // In Webserver
 //MessageBox.Show("Email address format is ok."); //In Windows Form
 }
 }
Imports System.Text.RegularExpressions
 
Private Sub is_valid_email(ByVal email_id As String)
    Dim matchRegex As New Regex("[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-\.]+\.[a-zA-Z]{2,5}")
    Dim matches As MatchCollection = matchRegex.Matches(email_id)
    If matches.Count = 0 Then
        Response.Write("Wrong email address format.") ' In Webserver
        'MessageBox.Show("Wrong email address format."); 'In Windows Form
    Else
        Response.Write("Email address format is ok.")    ' In Webserver
        'MessageBox.Show("Email address format is ok."); 'In Windows Form
    End If
End Sub
import java.util.regex.*;
public class is_valid_email
{
 public static void main(String str_email_id)
 {
 Pattern p=Pattern.compile("[a-zA-Z]*[0-9]*@[a-zA-Z]*.[a-zA-Z]*");
 Matcher m=p.matcher(str_email_id);
 boolean matchFound = m.matches();
 if(matchFound)
 {
 System.out.println("Email address format is ok.");
 }
 else
 {
 System.out.println("Wrong email address format.");
 }
 }
}
Function is_valid_email($email_id)
{
 if (preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/',$email_id))
 {
     echo "Email address format is ok.";
 }
 else
 {
     echo "Wrong email address format.";
 }
}

Validate Phone numbers: Validate US phone number eg: 123-456-7890

?View Code JAVASCRIPT
function is_valid_phone_no(str_phone_no)
{
 var filter =  /^((\+?1-)?\d\d\d-)?\d\d\d-\d\d\d\d$/;
 if (!filter.test(str_phone_no))
 {
 alert(’Wrong phone number format.’);
 }
 else
 {
 alert('Phone number format is ok.')
 }
 return false;
}
?View Code CSHARP
 using System.Text.RegularExpressions;
 
 private void is_valid_phone_no(string str_phone_no)
 {
 Regex matchRegex = new Regex(@"\d{3}-\d{3}-\d{4}$");
 MatchCollection matches  = matchRegex.Matches(str_phone_no);
 if(matches.Count==0)
 {
 Response.Write("Wrong phone number format."); // In Webserver
 //MessageBox.Show("Wrong phone number format."); //In Windows Form
 }
 else
 {
 Response.Write("Phone number format is ok."); // In Webserver
 //MessageBox.Show("Phone number format is ok."); //In Windows Form
 }
 }
Imports System.Text.RegularExpressions
Private Sub is_valid_phone_no(ByVal str_phone_no As String)
    Dim matchRegex As New Regex("\d{3}-\d{3}-\d{4}$")
    Dim matches As MatchCollection = matchRegex.Matches(str_phone_no)
    If matches.Count = 0 Then
        Response.Write("Wrong phone number format.") ' In Webserver
        'MessageBox.Show("Wrong phone number format."); 'In Windows Form
    Else
        Response.Write("Phone number format is ok.")    ' In Webserver
        'MessageBox.Show("Phone number format is ok."); 'In Windows Form
    End If
End Sub
import java.util.regex.*;
public class is_valid_phone_no
{
 public static void main(String str_phone_no)
 {
 Pattern p=Pattern.compile("^\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$");
 Matcher m=p.matcher(str_phone_no);
 boolean matchFound = m.matches();
 if(matchFound)
 {
 System.out.println("Phone number format is ok.");
 }
 else
 {
 System.out.println("Wrong phone number format.");
 }
 }
}
Function is_valid_phone_no($str_phone_no)
{
 if (preg_match('/\(?\d{3}\)?[-\s.]?\d{3}[-\s.]\d{4}/x',$str_phone_no))
 {
     echo "Phone number format is ok.";
 }
 else
 {
     echo "Wrong phone number format.";
 }
}

Validate Zip/Postal Codes: Validate US Zip/Postal Code eg: 12345-6789

?View Code JAVASCRIPT
function is_valid_zip_code(str_zip_code)
{
 var filter =  /^\d\d\d\d\d-\d\d\d\d$/;
 if (!filter.test(str_zip_code))
 {
 alert(’Wrong Zip/Postal Code format.’);
 }
 else
 {
 alert('Zip/Postal Code format is ok.')
 }
 return false;
}
?View Code CSHARP
 using System.Text.RegularExpressions;
 
 private void is_valid_zip_code(string str_zip_code)
 {
 Regex matchRegex = new Regex(@"\d{5}-\d{4}$");
 MatchCollection matches  = matchRegex.Matches(str_zip_code);
 if(matches.Count==0)
 {
 Response.Write("Wrong Zip/Postal Code format."); // In Webserver
 //MessageBox.Show("Wrong Zip/Postal Code format."); //In Windows Form
 }
 else
 {
 Response.Write("Zip/Postal Code format is ok."); // In Webserver
 //MessageBox.Show("Zip/Postal Code format is ok."); //In Windows Form
 }
 }
Imports System.Text.RegularExpressions
Private Sub is_valid_zip_code(ByVal str_zip_code As String)
    Dim matchRegex As New Regex("\d{5}-\d{4}$")
    Dim matches As MatchCollection = matchRegex.Matches(str_zip_code)
    If matches.Count = 0 Then
        Response.Write("Wrong Zip/Postal Code format.") ' In Webserver
        'MessageBox.Show("Wrong Zip/Postal Code format."); 'In Windows Form
    Else
        Response.Write("Zip/Postal Code format is ok.")    ' In Webserver
        'MessageBox.Show("Zip/Postal Code format is ok."); 'In Windows Form
    End If
End Sub
import java.util.regex.*;
public class is_valid_zip_code
{
 public static void main(String str_zip_code)
 {
 Pattern p=Pattern.compile("^(\\d{5})[- ]?(\\d{4})$");
 Matcher m=p.matcher(str_zip_code);
 boolean matchFound = m.matches();
if(matchFound)
 {
 System.out.println("Zip/Postal Code format is ok.");
 }
 else
 {
 System.out.println("Wrong Zip/Postal Code format.");
 }
 }
}
Function is_valid_zip_code($str_zip_code)
{
 if (preg_match('/^([0-9]{5})(-[0-9]{4})?$/i',$str_zip_code))
{
     echo "Zip/Postal Code format is ok.";
 }
 else
 {
     echo "Wrong Zip/Postal Code format.";
 }
}

Validate Domain Name eg: http://live.com

?View Code JAVASCRIPT
function is_valid_url(str_url)
{
 var filter =   /^(ht|f)tps?:\/\/[a-z0-9-\.]+\.[a-z]{2,4}\/?([^\s<>\#%"\,\{\}\\|\\\^\[\]`]+)?$/
 if (!filter.test(str_url))
 {
 alert(’Wrong URL format.’);
 }
 else
 {
 alert('URL format is ok.')
 }
 return false;
}
?View Code CSHARP
 using System.Text.RegularExpressions;
 private void is_valid_url(string str_url)
 {
Regex matchRegex = new Regex(@"(http|https)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?");
 MatchCollection matches  = matchRegex.Matches(str_url);
 if(matches.Count==0)
 {
 Response.Write("Wrong URL format."); // In Webserver
 //MessageBox.Show("Wrong URL format."); //In Windows Form
 }
 else
 {
 Response.Write("URL format is ok."); // In Webserver
 //MessageBox.Show("URL format is ok."); //In Windows Form
 }
 }
Imports System.Text.RegularExpressions
 
Private Sub is_valid_url(ByVal str_url As String)
    Dim matchRegex As New Regex("(http|https)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?")
    Dim matches As MatchCollection = matchRegex.Matches(str_url)
    If matches.Count = 0 Then
        Response.Write("Wrong URL format.") ' In Webserver
        'MessageBox.Show("Wrong URL format."); 'In Windows Form
    Else
        Response.Write("URL format is ok.")    ' In Webserver
        'MessageBox.Show("URL format is ok."); 'In Windows Form
    End If
End Sub
import java.util.regex.*;
public class is_valid_url
{
 public static void main(String str_url)
 {
 Pattern p=Pattern.compile("(http|https)://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?");
 Matcher m=p.matcher(str_url);
 boolean matchFound = m.matches();
 if(matchFound)
 {
 System.out.println("URL format is ok.");
 }
 else
 {
 System.out.println("Wrong URL format.");
 }
 }
}
Function is_valid_url($str_url)
{
 if (preg_match('/^([0-9]{5})(-[0-9]{4})?$/i',$str_url))
 {
     echo "URL format is ok.";
 }
 else
 {
     echo "Wrong URL format.";
 }
}

Intro to LINQ (Language Integrated Query)

Wednesday, March 11th, 2009

Introduction to LINQ (Language Integrated Query)

LINQ (Language Integrated Query) and .Net Framework 3.5 in a variety allows you to query the data in a standardized way for the typed of data collection, it features an integrated language. Development Tools Visual Studio 2008 are supported.

LINQ is a language that supports the standard query operators are defined, you can filter the enumeration process and the projection of a common syntax for different data sets.

Example:

Select from the set of formulas to the LINQ query expression. In this code, strName are extracted from the beginning with ‘v‘, it is stored in str, it is output in sequence foreach

?View Code CSHARP
string [ ]  strName =
{
"Benny",
"Venu",
"Roger",
"Thomas",
"Varghese",
"Danny"
} ;
var str = from x in  strName
where x[0]  == 'v'
select x;
 
foreach ( var y in  str )
{
Console. WriteLine (y) ;
}

Language Specification:

LINQ is a language, LINQ is introduced together with the new language version in order to provide more capacity. For example, the query expressions, extension methods, lambda expressions, anonymous types and so on. As for the example in C# we would like to be referred to the specification from of C# 3.0.

Data Source:

LINQ, including those by third parties, may be applied to any type of data source. This is achieved by adding to the data source as a method for extending the standard query operators.

The traditional set of objects for sorting and enumerated data types and a similar array to handle efficiently the filter (Array class) by using the object or collection. The databases and XML data set on the ADO.NET operation was necessary and is treated as different data sets. LINQ by, and can be treated without distinction in the common data sets and objects. Compared with other languages, Ruby and Active Record is a combination of excellent handling of this collection are believed to be extended to counter-conscious language.

For example, Microsoft will be implemented by the following.

  • LINQ to ADO.NET
    • LINQ to SQL (DLinq)
    • LINQ to Entities
    • LINQ to DataSet
  • LINQ to XML (XLinq)
  • LINQ to Objects

The Language Which Corresponds to LINQ

  • C# 3.0
  • F# 1.1.8.1
  • Visual Basic 9.0

As for C++/CLI as for the schedule which corresponds to LINQ it is not, the library related to LINQ it can be used only is until recently with sentence structure of sort.

Free eBooks For Beginner Programmers

Wednesday, March 11th, 2009

1) ASP.NET MVC

A strong 195 pages with chapters of Wiley Publishing published book “Professional ASP.NET 1.0 MVC” is a preliminary version in PDF format. The book was written by renowned authors Rob Conery, Scott Hanselman, Phil Haack and Scott Guthrie.

The free chapter gives a detailed example of the project NerdDinner, a website to plan and arrange joint dinner. It is shown how this small but complete application built with ASP.NET MVC. The source code can be found on Codeplex (http://nerddinner.codeplex.com) .

Click here to download.

2) Microsoft Visual Studio 2008 EBooks (LINQ, Silverlight 2 and ASP NET 3.5)

Microsoft hass published interesting three books. Great!

  1. Introducing Microsoft LINQ
  2. Introducing Microsoft ASP.NET AJAX
  3. Introducing Microsoft Silverlight 1.0

Click here to download.

3) Understanding Microsoft Virtualization Solutions

Microsoft Press has published “Understanding Microsoft Virtualization Solutions – From the Desktop to the Datacenter” now available as free downloads. Great! ! Microsoft seems to have missed the virtualization pattern gradually came to really try.

Click here to download.

4) 7 Development Projects for Microsoft Office Sharepoint Server 2007 and Windows Sharepoint Services Version 3.0

Click here to download.

Intro to ASP.NET Maker, PHPMaker, ASPMaker, JSPMaker, XML/XSLT Maker & CFMMaker.

Monday, March 9th, 2009

ASP.NET Maker : Generate the asymmetric multiprocessing system. Net 2. 0 writes the script from the database

ASP.NET Maker is a powerful yet easy-to-use ASP.NET code generator for ASP.NET 2.0. It can create a full set of ASP.NET 2.0 pages quickly from Microsoft Access, Microsoft SQL Server, MySQL, Oracle and other ODBC data sources. You can instantly create Web sites that allow users to view, edit, search, add and delete records on the Web.
ASP.NET Maker offers numerous useful features, including 3-Tier Architecture, ASP.NET AJAX, Extended Quick Search, Drill-down Master/Detail, Advanced Security, User Registration System, Custom View, Report, Export, File.

Better Quality Video Tutorial: Click Here

Read More..

PHPMaker: Generate PHP from MySQL

PHPMaker is the powerful automation equipment which can generate all matching of PHP directly from the database of MySQL, (because of Windows). Using PHPMaker, in order to compile because the user searches at once, in order to add, it makes that you see, possible, deleting the record of the net data type everything of MySQL, including BLOB, ENUM and set can draw up the web sight which it supports.

Read More..

ASPMaker: Generate the asymmetric multiprocessing system from the database.

ASPMaker the asymmetric multiprocessing system (the be active server page) is the powerful automation equipment which can generate all matching directly from the database of the Microsoft access or data source which supports the noise. Using ASPMaker, at once the user looks at the record of the net, compiles, searches, adds, can draw up the web sight which makes that it deletes possible.

Read More..

JSPMaker: JSP is generated directly from MySQL or Oracle.

JSPMaker however JSP (the page of JavaServer) being powerful draws up all matching directly from MySQL or Oracle, is the cord/code generator which it is easy to use.

Read More..

XML/XSLT Maker: The lattice of DHTML and dynamic XML/XSLT draw up the web sight which it has made be based

As for XMLMaker the lattice of DHTML for the general user and dynamic XML/XSLT for the developer of time it is the cord/code generator which cannot draw up the web sight which it has made be based. The lattice of DHTML is the WEB based lattice part which is based on conduct and XML/XSLT of DHTML, but that the lattice is used, knowledges of XML/XSLT/DHTML is not required.

Read More..

CFMMaker: Generate the template of CFM from the database.

CFMMaker however CFM (the template of ColdFusion) being powerful draws up all matching directly from your data source, is the cord/code generator which it is easy to use. The database which is supported makes a noise and or connection characteristic Microsoft of ODBC access, the Microsoft SQL server, includes Oracle or the database.

Read More..

Mobile-enabled “JavaFX SDK 1.1″

Sunday, March 8th, 2009

Read My Perv Post: The First & Basic Overview Of JavaFX

Sun Microsystems is 12 February 2009, the development environment for mobile RIA “JavaFX Mobile” released, RIA-enhanced strategies. JavaFX’s Web site, available for download.

JavaFX is a scripting language “JavaFX Script”, runtime environment. Drag the Web GUI and functionality of desktop applications and browser features, such as the ability to drop, to develop interactive Web applications. JavaFX Mobile is a mobile version.

Sun has released the “JavaFX 1.1 SDK”, the emulator “JavaFX Mobile Emulator”, including the latest version of JavaFX, JavaFX Mobile was fully supported. Developers are using it, “Java Platform Micro Edition (Java ME)” for mobile devices that operate in RIA development.

According to Sun, the world’s 26 million mobile phones which support Java, Java is a leading mobile platform. Sun’s Java RIA strategy aims to capitalize on a wide range of technology diffusion.

The Sun, JavaFX Mobile announcement and the UK Sony Ericsson, LG Electronics and Korean cell phone manufacturers and carriers such as JavaFX Moile has also said it is cooperating with the phone.

Sun Microsystems Inc.
http://www.sun.com

“JavaFX 1.1 SDK” download
http://www.javafx.com/

The First & Basic Overview Of JavaFX

Sunday, March 8th, 2009

December 2008, finally has been released JavaFX. Since 2007, it was announced at JavaOne a half years, Therefore, this release of JavaFX 1.0 was based on a series of intensive short-term and explains the JavaFX.

What is JavaFX

JavaFX is Sun Microsystems (Sun following the notation) is a new platform for rich client provides. Java is in the name, Java is platform independent. However, technology is a Java-based.
JavaFX development are done in open source. The java.net project in OpenJFX, OpenJFX-Compiler project & SceneGraph is being vigorously developed in the project. However, at present does not seem to have been the source of all.
JavaFX, 2007 in San Francisco was announced at JavaOne. Initially, RIA (Rich Internet Application) is used for the side, RIA can build not just a different user interface. For example, Java’s Swing GUI’s API is only part of the application that was created using JavaFX build, it is possible.
As described above for the Java JavaFX is built on technology, Java is well and good, Java API diversity can be used seamlessly.

JavaFX area covered by

JavaFX is a desktop PC application that operates not only cover various areas including mobile phones. JavaFX will run on Java VM. The Java VM as well as Java SE, Java ME in the CLDC (Connected Limited Device Configuration) and CDC (Connected Device Configuration) you can run. Therefore, mobile phones and smart phones, set-top box and can run JavaFX. In addition, Blu-ray players are employed by the CDC based on the BD-J, JavaFX will cover the area. CLDC does not adopt the Google Android, but the 2008 JavaOne JavaFX demo was run.
Which covers various areas such JavaFX is, in each region, in a different way of creating applications. The specific language of the script to build the user interface was developed in JavaFX Script. Using JavaFX Script, Java was once boasts the “Write Once, Run Anywhere” are able to achieve again.

JavaFX development history

JavaFX is original, SeeBeyond’s Christopher Oliver was started as a personal project of his. JavaFX is not at that time, Form Follows Function (F3) was named.
The Sun in September 2005, it acquired SeeBeyond, F3 is now Sun’s technology assets. Later, Oliver says, established in 2006 to 11 blogs, then F3 is released. Then F3 is the Java SE and Java 2D and Swing to depend on and could not work only on your desktop. However, in embedded applications in a mobile phone F3 to make this work is important. So the strategy was adopted, JavaSE was acquired companies. This is just before JavaOne 2007, and 2007 will be the month.
Usually, the phone will work CLDC, JavaSE phone company for the CDC had been developed. The CDC JSR 209 Advanced Graphics and User Interface Optional Package for the J2ME Platform with Swing and Java 2D can run. Therefore, CDC and JSR 209 for embedded applications based on JavaFX was established.
And, JavaOne 2007 in F3 is JavaFX is renamed and a major announcement was that.
JavaOne 2007 in F3 and was originally organized the session, but that did not receive much attention.
Immediately after the announcement at JavaOne, OpenJFX project is started in the JavaFX SDK was released.
Were published during this operation was in JavaFX interpreter. In other words, the interpretation of the script at startup, Java transformation classes, was the flow of work to compile from. This is a drawback that would start a long time there.
Therefore, prior to the compilation was done at every boot, the system was adopted by the compiler. To develop a compiler OpenJFX-Compiler project was launched in 2007, also GUI components SceneGraph is being developed in the project. The JavaFX Desktop for desktop of the year’s preview of the SDK was released in July. Of course, is to work on a compiler.
And December 4, JavaFX Desktop 1.0, including the JavaFX SDK 1.0 has been released. In addition, JavaFX SDK for applications built with JavaFX Mobile is also included in the beta.
The 2007 version of the compiler and interpreter version was published in the grammar and API has been changed, and many other areas. Also, Preview SDK and some API in the official version so you must be careful to change. For these changes is summarized in the Appendix at the end of this series, please do help.

NetBeans Installation

JavaFX is the Web site of the following three tools can be downloaded as a single package.

  • NetBeans IDE 6.5 for JavaFX 1.1 (NetBeans JavaFX to be incorporated into a plug-in development)
  • JavaFX 1.1 Production Suite (Plugin for Adobe Illustrator and Photoshop )
  • JavaFX 1.1 SDK (command line tools)

JavaFX
JavaFX download page

Here, NetBeans IDE 6.5 for JavaFX 1.0 using JavaFX about how to develop applications. NetBeans IDE 6.5 for JavaFX is JavaFX in the NetBeans Web site or the Web allows people to download the installer from the site. The already installed NetBeans can be installed via the Update Center.

Introduction to JavaFX Script

Actually using JavaFX NetBeans So let’s look at the steps of application development. First Project Creation Wizard “JavaFX Script Application”, choose to create a project.

Project Creation Wizard
Project Creation Wizard

Project was created
Project was created

Project was to create a simple JavaFX Script is Main.fx are included. It is particularly difficult at first just to see what you think.

package thecoders_javafxapp3;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
 
Stage {
title: "Application title"
width: 250
height: 80
scene: Scene {
content: Text {
font : Font {
size : 16
}
x: 10, y: 30
content: "Application content"
}
}
}

JavaFX Script is a window corresponding to the stage (Stage) have a concept. Also, in a single stage multiple scenes (Scene) can be defined. Around this concept is similar to Flex. In addition, the Java syntax is very different, it can be defined using a notation declared in the user interface.
To debug JavaFX applications will run the project, right-click “Run Project” or selected, click the button on the toolbar. NetBeans project has a main idea, you can only run from the toolbar is set to project the main project. If you want to change the main project from the project right-click menu “Set as Main Project” is set to project the main project if you choose.

JavaFX should be created immediately after the window appears as follows: When you run the project. Output in Web Click here..

JavaFX

JavaFX project was performed

JavaFX Script Editor Features

NetBeans is the JavaFX Script Editor features such as input completion and error checking script.

javafx_06

JavaFX Script code completion
The palettes that are located on the right side of the editor area drag to paste code snippets to the editor by drop. Snippets that are registered in the palette is a simple thing, JavaFX to know and control will be available in a good clue.

Palette
Palette

JavaFX event handling

As an example, with event handling and let’s create a simple JavaFX application. Creating the application of the following would change the color and the mouse to the area of the rectangle overlap. In Web Click here..

javafx_08

Mouse Over

javafx_09
Creating sample application

Source code is as follows. Rectangle is a rectangle shape to draw, onMouseEntered onMouseExited when overlapped and the shape of mouse, which describes the process to change the background color when off.

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.shape.*;
import javafx.scene.paint.*;
import javafx.scene.input.*;
/**
* @author VenuThomas
*/
 
Stage {
title: "Sample Program"
scene: Scene {
width: 350
height: 175
content:[
Rectangle {
x: 50
y: 50
width: 250
height: 55
fill: Color.BLACK
onMouseEntered: function( e: MouseEvent ):Void { var rect: Rectangle = e.node as Rectangle;
rect.fill = Color.BLUE
}
onMouseExited: function( e: MouseEvent ):Void { var rect: Rectangle = e.node as Rectangle ;
rect.fill = Color.BLACK
}
 
}
Text {
font: Font {
size: 20
name: "Monospaced"
}
x: 60,
y: 85
fill: Color.WHITE
content: bind "code.venuthomas.net"
}
]
}

There are many benefits and challenges of new technology

RIA platform and Microsoft’s Silverlight and Adobe’s AIR, which is crammed with powerful competitive platform, JavaFX and whether it is the mainstream is unclear. JavaFX is based on Java platform, but have to learn the new JavaFX Script must have the tools and the development is still far and have the disadvantage in comparison to other competing technologies.
But JavaFX rich in Java can take advantage of existing assets, JavaVM and reliability by running on a Java platform many unique advantages. Also, NetBeans plugin for JavaFX, but there is room for much improvement in terms of function, which is open-source development tools, that can get a free development environment for developers and benefits might be true.
JavaFX is still 1.1 has just been released. I look to the future trends.

Sun Microsystems Inc.
http://www.sun.com

“JavaFX 1.1 SDK” download
http://www.javafx.com/