Advertuse

Search This Blog

Your Ad Here

Friday 24 October, 2008

.net 3.0/3.5 ફ્રેમવર્ક

.net 2.0 ફ્રેમવર્કમાં નીચેના નવા ચાર મોડયુલ ઉમેરતા .net 3.0 ફ્રેમવર્ક બને છે.
૧ WWF (વિન્ડો વર્કફલો ફાઉન્ડેશન )
૨ WCF (વિન્ડો કોમ્યુનીકેશન ફાઉન્ડેશન)
૩ WPF (વિન્ડો પ્રેઝનટેશન ફાઉન્ડેશન)
૪ CardSpace (કાડૅ સ્પેસ)
અને .net 3.0 મા LINQ (લીન્ક) મોડયુલ ઉમેરતા તે .net 3.5  ફ્રેમવર્ક બને છે.

તો ચાલો આપણે તેની પ્રાથમિક માહિતી મેળવીએ.

WWF (વિન્ડો વર્કફલો ફાઊંડેશન્ ) :
વિન્ડો વર્કફલો ફાઊંડેશન એટલે કોઇ કાર્ય કરવા માટે ના શ્રેણીબધ પગલા, નિર્ણય અને નિયમોનુ આલેખન
આજના આધુનીક સોફ્ટ્વેર યુગમાં, જ્યાં SOA(software oriented Architecture) એટલે કે સોફ્ટવેર ઑરીએંટેડ આર્કિટેક્ચર નો ઉપયોગ કરીને સોફ્ટવેર બનાવવામા આવે છે ત્યારે WWF ઘણુ ઉપયોગી નીવડે તેમ છે. કારણક SOA વાળા સોફ્ટવેરમાં business logic(ધંધા સૂઝ) અને તેનુ implementation (અમલીકરણ ) વચ્ચે સ્પષ્ટ ભેદરેખા જળવવી જરુરી છે. એટલે અંહિયા WWF નો ઉપયોગ business logic(ધંધા સૂઝ)નુ આલેખન કરવા માટે વાપરી શકાય છે. અને ત્યાર બાદ તેને કોઈ પણ .net એપલિકેશનમાં હોસ્ટ કરી શકાય છે. નીચે આપેલા નેમસ્પેસ(namespace)નો ઉપયોગ કરી નવા વર્કફલોના કોડિંગની કરી શકાય છે. માટે તેને નવા વર્કફલોના કોડિંગની ફાઇલમાં ઇન્ક્લૂડ કરવા જરુરી છે. 
using System.Workflow.ComponentModel.Compiler;  
using System.Workflow.ComponentModel.Serialization;  
using System.Workflow.ComponentModel;  
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;  
using System.Workflow.Activities;  
using System.Workflow.Activities.Rules;

૨ WCF (વિન્ડો કોમ્યુનીકેશન ફાઉન્ડેશન)

વિન્ડો કોમ્યુનીકેશન ફાઉન્ડેશન એટલે જુદી જુદી એપલીકેશન અથવા પ્રોસેસ વચ્ચેની આંતરી સંચાર વ્યવસ્થા માટેની સામાન્ય વ્યવસ્થા. જે SOA(software oriented Architecture) એટલે કે સોફ્ટવેર ઑરીએંટેડ આર્કિટેક્ચર ના અમલીકરણ વાળા સોફ્ટવેર માટે જરુરી છે. .NET 2.0 ની અંદર એપલીકેશન/પ્રોસેસ વચ્ચેની આંતરી સંચાર વ્યવસ્થા માટે નીચે જણાવેલ વ્યવસ્થા ઉપલબ્ધ છે.  
૧. SOAP પ્રોટોકૉલ વાળી વેબ સર્વિસ(web service) 
૨. બાઇનરી(binary)/શોપ્(SOAP)/કસ્ટમ(custom) પ્રોટોકૉલ વાળી ડોટનેટ રીમોંટીંગ્( .NET Remoting) 
3. transactional communications  
4. એસિંક્રોનસ કોમ્યુનિકેશન્ (MSMQ)
ઉપરોક્ત ચારે સંચાર વ્યવસ્થાના એકીકરણ કરીને વિન્ડો કોમ્યુનીકેશન ફાઉન્ડેશનની રચના કરવામા આવી છે. WCF ના ઉપયોગથી distributed application(ડિટ્રિબ્યુટેડ ઍપ્લિકેશન)ની આંતરી સંચાર વ્યવસ્થા ના કોડીંગ માટે મજબુત માળખુ પુંરુ પાડે છે. નીચે આપેલા નેમસ્પેસ(namespace)નો ઉપયોગ કરી નવા WCFનુ કોડિંગની કરી શકાય છે. માટે તેને WCFના કોડિંગની ફાઇલમાં ઇન્ક્લૂડ કરવા જરુરી છે.
using System.Runtime.Serialization 
using System.ServiceModel  
using System.ServiceModel.Configuration 
using System.ServiceModel.Description 
using System.ServiceModel.MsmqIntegration 
using System.ServiceModel.Security



Friday 10 October, 2008

WF .net 3.0/3.5

Workflow foundation is very handy tool to develop Service Oriented Architecture(SOA) base application on .net platform.
Main step to utilize WF in your any .net application are as follows.

Step 1. Create a workflow using standard activity or custom activity with help of workflow designer.

Step 2. Create a workflow runtime instance in any desire host application to run workflow inside your desire application like window application, console application, asp.net application, window service.

Workflow
workflow is the organize bunch of units called activity. which create the work model to resemble real word process. In other sense workflow is description of order of activity execution and relationship dependency of activity.


Mainly two type of workflow supported by .net framwork.
  1. Sequential Workflows
  2. State Machine Workflows
Sequential Workflow
It is rigid flow which contain loop and branches with condition and path through the workflow is deterministic.
State Machine Workflows
State machine workflows is composition of set of states, transitions, and actions. It is more event driven workflow. It wait for an event and trigger to change the new state.

there are many a ready made Activities given in Visual Studio

.net Remoting Config file of client side and server side

Client Config

Server Config
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown type="RemotableType, RemotableType" url="http://localhost:8989/RemotableType.rem" />
</client>
</application>
</system.runtime.remoting>
</configuration>


<configuration>
<system.runtime.remoting>
     <application>
           <service>
               <wellknown mode="Singleton"                  type="RemotableType, RemotableType" objectUri="RemotableType.rem" />
</service>
<channels>
<channel ref="http" port="8989"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>

application tag has sub tag of client

application tag has sub tag of Service and Channel