Friday, April 18, 2008

FleXtense 2.0 Released

Hi all,

FleXtense 2.0 released with the online use of generator. We tried to fix many of the bugs we noticed and you reported.

FleXtense is now fully served to you with online usage. We believe it will be more useful this way because it does not need to be installed on your local operating system and can be used from any computer.

Lastly, thank all of you for your posts in our forum .

Hope you find the new release of FleXtense useful!

Saturday, March 15, 2008

FleXtense Forum is now ready.

Hi everyone,

I would like to announce that we have run a forum which you can ask any questions about FleXtense, and using Web Services with Flex. We would like to see your postings.

On the other hand, we still working on the new release 2.0 version of FleXtense. We have been working hard to add more nice features in it, and that's why it took so long to complete. In about 1 month, we plan to publish the new version.

See you soon!

Labels: ,

Monday, December 31, 2007

Synchronous data calling with Flex.

You may read an article about Synchronous data calling with Flex.
From this link

Labels:

Tuesday, November 20, 2007

FleXtense Beta v1.1 releases in 1 week

Hi all,

The release of the latest Beta version of FleXtense -Beta v1.1- is suspended 1 week because of the workload. Thanks for your interest in FleXtense.

See you soon..

Labels: ,

Monday, November 12, 2007

What is in FleXtense beta v1.1 ? (Part 1)

In this article it is mentioned what FleXtense will includes about the next version of FleXtense which we thought to publish as two parts. The new version of Flextense is going to release on 19.11.2007 as free for the Flex users. These are the remarkable features in this version:

1. .Net DataSet support with Flex (sending and receiving to web services),
2. Directly binding Collection Classes to Data Controls,
3. toXML and toJSON support for Collection Classes,
4. toXML and toJSON support for Entity Classes,
5. Bug Fixes on version 1.0
6. Credential settings for the access of WSDL files

1 .Net(DotNet) DataSet support with Flex ,

DataRow, DataRowCollection, DataColumn, DataColumnCollection, DataTable,
DataTableCollection and DataSet Classes has been added to FleXtense core library to work with .NET DataSet.

Flex DataSet Object Model



With help of these classes a DataSet can be returned from a Asp.Net web service or can be sent dataset object to a web service. You can directly connect to any data provider objects with any DataTable object (such as DataGrid, ComboBox) from tables collection in this dataset.

For Example:

var ds:DataSet = e.result //Type of Result is like the type of flextense.core.data.DataSet

datagrid.dataProvider = ds.tables.getTableByIndex(0).bindableData;

so as…

We will check out DataSet on the next blog article as in depth.

2. Directly binding Collection Classes to Data Controls,

All collection clasees inherited ICollectionView according to the new code template. However, you can connect collection classes returning from web services directly to flex controls.

For Example:

var userCollection:UserCollection = e.result //Returns a value with type of UserCollection

datagrid.dataProvider = userCollection ;

The new added methods and properties with ICollectionView interface to Collection clesses.


Public Properties


filterFunction : Function
A function that the view will use to eliminate items that do not match the function's criteria.


length : int
[read-only] The number of items in this view.

sort : Sort
The Sort that will be applied to the ICollectionView.

Public Methods

addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.


contains(item:Object):Boolean
Returns whether the view contains the specified object.


createCursor():IViewCursor
Creates a new IViewCursor that works with this view.

disableAutoUpdate():void
Prevents changes to the collection itself and items within the collection from being dispatched by the view.

dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.

enableAutoUpdate():void
Enables auto-updating.

hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.


itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void
Notifies the view that an item has been updated.


refresh():Boolean
Applies the sort and filter to the view.


removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.


willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.

Details about DataSet Usage and the other subjects will be placed on next blog article.

Saturday, October 6, 2007

How can we use weather forecasts into the Flex













In December 2004 the National Oceanic and Atmosphere Administration (NOAA) unveiled a Web service for accessing weather forecasts for locations within the United States.

This example shows how can be used weather informations using web services(NOAA) from through the Flex.

The applications for this example are,
FleXtense
Flex Builder 2.0

You can download the source codes of example from here. You can see the running application from here

Labels:

Sunday, September 30, 2007

FleXtense Crud Example (Flex + .Net + Database)

Click picture for watching tutorial video




We sometimes need to reach server in the applications of flex which we have developed.There are some alternatives (HttpService,WebService etc.) to reach the server through the Flex.
In this example, we will make a crud application by using the asp.net web services and FleXtense.
The applications for this example are,
FleXtense
Flex Builder 2.0
Visual Studio 2005
Ms Sql Server

First of all, we make a database table which we use ,script of user table.

CREATE TABLE [dbo].[Users](
[ID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[Name] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Surname] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Age] [int] NULL,
CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

Afterwards,we make the necessary web service to work with datas on this table. There are 4 methods, GetUsers,UpdateUser,DeleteUser and AddUser in our web service. We make a class the type of User to reach datas as object oriented. Make another class of usercollection type in this class collection. Our web methods will work by these objects.

public class User
{
#region fields
private int id;
private string name;
private string surname;
private int age;
#endregion

#region C\tor
public User(int id, string name, string surname, int age)
{
this.id = id;
this.name = name;
this.surname = surname;
this.age = age;
}

public User()
{

}
#endregion

#region Properties
public int Id
{
get { return id; }
set { id = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public string Surname
{
get { return surname; }
set { surname = value; }
}
public int Age
{
get { return age; }
set { age = value; }
}
#endregion
}


User Collection class


public class UserCollection:List<User>
{
public UserCollection()
: base()
{ }
}


The business layer that includes complex processes and entity classes which had values returned from Data Access Layer


public class UserController
{
#region GetUsers
public static UserCollection GetUsers()
{
IDataReader reader = UserData.GetUsers();
UserCollection collection = new UserCollection();
try
{
while (reader.Read())
{
User user = new User();
user.Id = reader.GetInt32(0);
if (!reader.IsDBNull(1))
user.Name = reader.GetString(1);
if (!reader.IsDBNull(2))
user.Surname = reader.GetString(2);
if (!reader.IsDBNull(3))
user.Age = reader.GetInt32(3);

collection.Add(user);
}

return collection;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (!reader.IsClosed)
reader.Close();
}
}
#endregion

#region UpdateUser
public static void UpdateUser(User user)
{
UserData.UpdateUser(user.Id, user.Name, user.Surname, user.Age);
}
#endregion

#region DeleteUser
public static void DeleteUser(int userId)
{
UserData.DeleteUser(userId);
}
#endregion

#region AddUser
public static void AddUser(string name, string surname, int age)
{
UserData.AddUser(name, surname, age);
}
public static void AddUser(User user)
{
AddUser(user.Name, user.Surname, user.Age);
}
#endregion

}


And finally, make the Userservice class in side of asp.net web service.

public class UserService : System.Web.Services.WebService
{

[WebMethod]
public UserCollection GetUsers() // There is a return value in usercollection type.
{
return UserController.GetUsers();
}
[WebMethod]
public OperationState UpdateUser(User user) //A parameter is taken from user type.
{
try
{
UserController.UpdateUser(user);
/*OperatinState is an enum which has two items are successful and unsuccessful. */

return OperationState.Successful;

}
catch
{
return OperationState.UnSuccessful;
}

}

[WebMethod]
public OperationState DeleteUser(int userId)
{
try
{
UserController.DeleteUser(userId);
return OperationState.Successful;
}
catch
{
return OperationState.UnSuccessful;
}

}

[WebMethod]
public OperationState AddUser(User user)
{
try
{
UserController.AddUser(user);
return OperationState.Successful;
}
catch
{
return OperationState.UnSuccessful;
}

}
}


You can look at the codes which have produced by Flex from here.
You can download the example with the link below
Download

Labels: