Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam Michael S. Chan xLM Solutions, LLC.

Similar presentations


Presentation on theme: "Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam Michael S. Chan xLM Solutions, LLC."— Presentation transcript:

1 Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam Michael S. Chan xLM Solutions, LLC

2 + other business or engineering services and applications + other business or engineering services and applications Your own SOA solutions to extend SmarTeam

3 Outline What?What? SOA, Service, Contract, Endpoint? Why?Why? Benefits of an SOA How?How? Windows Communication Foundation (WCF) A Basic WCF Service Example A Simple Service An Even Simpler Client A SmarTeam SOA Service Example Adding Support for SmarTeam Debugging

4 What is a Service-Oriented Architecture (SOA)? An architectural concept, style, or paradigm Loosely coupled and distributed services provide the desired functionalities Not a technology-driven approachA business-driven approach What?

5 A self-contained, stateless entity that performs a certain business process Services are provided by a Provider (Server) Services are used by a Consumer (Client) What is a Service?

6 The Four Tenets of a Service 1.Boundaries are explicit 2.Services are autonomous 3.Services share the Schema and Contract, not classes 4.Service compatibility is based on Policy

7 Contracts Establish explicit boundaries for the service Three types of contracts: Service Contract: exposes Service behavior (methods) Data Contract: exposes persistent data Message Contract: exposes custom message structure

8 Why adopt an SOA? A foundation for seamless Enterprise Information Integration (EII) Open standards and messaging A high degree of loose coupling and interoperability across platforms and technologies Flexibility in software and hardware selections Independent and boundary-explicit services Allows for modulo development, deployment and maintenance Increase the ROI by developing new services and applications based on existing software and business processes Why?

9 Benefits of Extending SmarTeam with an SOA Developed SmarTeam Services are expendable and reusable for future projects Remote clients can run on systems with no SmarTeam installations Clients of various levels of complexity may connect and consume the SmarTeam services Different clients may consume different subsets of the SmarTeam services A client may be built as A standalone thin application A plug-in for another software package (e.g., Outlook) SharePoint web Part of a web page or site (e.g., a SharePoint web part) Developed SmarTeam Services are expendable and reusable for future projects Remote clients can run on systems with no SmarTeam installations Clients of various levels of complexity may connect and consume the SmarTeam services Different clients may consume different subsets of the SmarTeam services A client may be built as A standalone thin application A plug-in for another software package (e.g., Outlook) SharePoint web Part of a web page or site (e.g., a SharePoint web part)

10 How to Implement an SOA? How?

11 System Requirements Microsoft Windows Communication Foundation (WCF) in.NET Framework 3.0 Supports: Windows XP SP2 (add-on) Windows Server 2003 SP1 (add-on) Windows Server 2003 R2 (add-on) Windows Vista Windows Server 2008 Microsoft Visual Studio 2005 (SPx) or 2008 May use C#, VB.NET, or other CLR-Compatible languages

12 Hosting WCF Services 1.Self-hosting in any managed.NET application 2.Hosting in a standalone Windows service 3.Hosting in IIS ( Web Services) WinXP:IIS 5.1 Win2003/R2:IIS 6.0 Vista/Win2008:IIS 7.0 (Windows Activation Service) HTTP TCP/IP Named Pipes MSMQ *SmarTeam requirement *

13 A Basic WCF Service Example

14 WCF Support in Visual Studio 2005

15 VS2005

16 WCF in VS2005 Service Contract Definition (Interface Definition) Service Contract Definition (Interface Definition) Service Class Definition (Business Process Logic) Service Class Definition (Business Process Logic) Data Contract Definition (Custom Data Class Definition) Data Contract Definition (Custom Data Class Definition)

17 WCF in VS2005 Service Contract Service Contract Data Contract

18 WCF in VS2005

19 Setup Hosting on IIS

20 Tips: Setup Service Project Output Directory

21 Add Service Configuration File: STService.svc

22 STService.svc

23 Add web.config and Support for MetaData Exchange Services Behaviors

24 Checking… So Far So Good

25 Create a Console Client (Consumer)

26 Adding a Console Client… Run svcutil.exe in the client project directory to create app.config and BasicService.cs Add app.config and BasicService.cs to client projectAdd app.config and BasicService.cs to client project Add System.ServiceModel and System.Runtime.SerializationAdd System.ServiceModel and System.Runtime.Serialization Change Program.cs to ConsoleClient.csChange Program.cs to ConsoleClient.cs

27 Building the Console Client

28 A SmarTeam SOA Service Example

29 Development Approach Modify the MySTService.BasicService service Re-run svcutil.exeModify or re-develop the clientDebug the Service and Client

30 Tasks for this Example Add a method to return a list of Super Classes in the current SmarTeam database Obtain two names from each super class: Name – internal External name – friendly Develop a custom data class [DataMember] for the output

31 Using the SmarTeam Object Model and API

32 Add a New Data Contract (Custom Data Class)

33 Modify the WCF Service: Add SmarTeam Support Instantiate a SmarTeam engine (FreeThreadedEngine) Create new SmarTeam session Initialize session with the engine Connect session to a database Log onto session Log off SmarTeam Close database connection Close SmarTeam session Terminate SmarTeam engine Perform Business Logic

34 Modify the Service Code

35 Console Client

36 Service and Client Debugging Unblock Windows Firewall for VS2005 Remote Debugger

37 Debugging Your SmarTeam Service (With Visual Studio Remote Debugger) On the remote system (where the Service is hosted)…

38 Advanced Debugging

39 Debugging Example… An Example Application…

40 Other WCF Tools SvcConfigEditor.exe Create and modify configuration settings for WCF services Manage settings for WCF bindings, behaviors, services, and diagnostics SvcTraceViewer.exe Helps analyze diagnostic traces generated by WCF listeners

41 SmarTeam SOA Extension Considerations A Service should be stateless Create a new SmarTeam session (login,logoff) on each connection Client provides authentication information How to acquire the user name and password?

42 Try It Yourself and Have Fun! Thank You! Questions ? Michael S. Chan xLM Solutions, LLC.


Download ppt "Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam Michael S. Chan xLM Solutions, LLC."

Similar presentations


Ads by Google