{ explore .net }

To content | To menu | To search

Wednesday 14 October 2009

Oslo as a SOA Service Repository?

Don't expect an answer, only a question.

Could Oslo be used as a service repository in SOA within the enterprise? If so this could be quite powerful. You can create a grammar for the service contracts (wsdl, xsd...) and additional information concerning the service (SLA, discoverability...). This could really help in standardizing and centralizing the governance of SOA in the enterprise.

Might this be a valid implementation of Oslo?

Tweeting

Started tweeting


Tuesday 6 October 2009

Exploring MonoTouch with Tripy

As you might already know the people of Mono have made it possible to use the MonoDevelop IDE and C# to create applications for the iPhone. Whether this is good or bad I leave it up to you to decide, I'm just happy there is more than one way to develop for the iPhone. The thing that makes it possible is MonoTouch, the framework between the iPhone libraries and C#. MonoTouch is not free (single license costs $399, per year if you want updates) but there is a trial version to play with.

What do you need to get started:

  • Mac OS X Leopard (yes, you still need a Mac)
  • Mono framework for Mac
  • MonoTouch Framework
  • MonoDevelop for MonoTouch (it's a special version)
  • XCode and Interface Builder (should already be installed with Mac)

You can find the installation instructions and downloads on the site of MonoTouch.

Tip 1: Once you have everything installed and it's your first time using Mono on you Mac, go here to be able to launch MonoDevelop.

Tip 2: If you've never developed for the iPhone or Mac before and you know nothing of Objective-C (the natural language of Mac and iPhone) than I still suggest you to read the documentation on Apples website and maybe also read the book "Cocoa Programming for Mac OS X (3rd Edition)" (Aaron Hillegass). Trust me, this will really help you especially if you'll be using Interface Builder to create the views.

So now that you have the tools and knowledge you can get started. To help you on the way I'll be creating a sample application and publish the code on this blog as I progress but don't expect full tutorials as I don't have the time right now. The idea is to create a vacation/trip organizer and you can download the first pre-alpha release of Tripy.

The following features are included:

  • it uses a navigation controller for navigating between views
  • 3 (table)views are available (list of trips, overview of a trip, details of a trip item)
  • different examples to wire up a table view to its UITableViewDataSource and UITableViewDelegate, this also includes a custom UITableViewController
  • custom UITableViewCell created in Interface Builder
  • dummy data (no DB yet)

Future features:

  • adding, updating and deleting trips
  • more custom cells
  • SQLite support

I also try to use Interface Builder as much as possible, not only for creating the views and controls but also to wire everything up such as linking a UITableView with its UITableViewDataSource and UITableViewDelegate. In case you have no idea what I'm talking about, a UITableView uses a UITableViewDataSource to get filled and a UITableViewDelegate receives events from the UITableView.

This first code release is very rough, poorly tested and needs code cleanup/refactoring so please no comments on these subjects, this will be taken care of as I progress. If you have questions on how to do something or how something works, just drop me a comment.

You are free to use this code as you see fit but I will not take any responsibility for accidents this code might cause. The only thing I ask is to put a reference to me or this blog if you publish or change this code or applications your create with it. If you have any input, recommendations or if you want to add your own additions just let me know.

Download source code.

Tuesday 22 September 2009

SOA symposium presentations

The second international SOA symposium is organized from October 22-23 2009 in Rotterdam, the Netherlands. There are also 3 days of workshops (Oct. 19-21).

But, the presentations of last years symposium can be downloaded for free. Topics include SOA in genereal, architecture, ESB, REST, web services... They also mention that soon some video presentations will become available.

Monday 21 September 2009

MonoDevelop not starting on Mac OS

If your MonoDevelop is only jumping around but doesn't want to start check out this solution.

Thursday 17 September 2009

Understanding Oslo

Are you also intrigued by Oslo but don't really understand what to do with it?

Well, then you have to read this article of Kraig Brockschmidt, he talks about the part you don't here in the usual presentations. He also has 2 introduction articles to "M" (1, 2).

Saturday 12 September 2009

Starting a project

Isn't it great, you suddenly have THE idea, the one that will change the world, or at least your financial situation :-)

But besides having that idea, creating and delivering it you will also have to organize, structure, create/find/share information, collaborate... and preferably in a cost effective way (free) Here I'll give you some ideas and tools to accomplish this. All the tools are based on collaboration and sharing over the internet so your partners in crime can even be on different continents and these tools are not only for technical projects.

Structure

First of all you'll need to structure the files and information you'll be creating and gathering.... This will help you find the documents and keep a clear overview of the information. Here is an example structure, feel free to create your own:

00 Initiate
01 Requirements
02 Application
     01 Design
          Graphics
     02 Test
     03 Manuals
     04 Operations
          Setup Client
          Setup Server
03 Data
...........

Tools

Organization
This means structuring the execution of the project, todo lists, milestones, discussions, responsibilities... Checkout Basecamp, they have several plans including a free one to handle 1 project.

Sharing
To easily share your files I propose Microsoft Live Mesh, it allows you to sync files between your pc's, your online Live Mesh Desktop and with other people using Live Mesh. Think of it as syncing your files in the cloud. You just have to install the client, tell it which folders to sync and you're ready. Just work on your files locally and when you save them they will automatically get synced with the cloud and with the people that have access. It works on Windows, Windows Mobile and Mac. Even if you're working alone on this project I would suggest using this tool, you automatically have a backup and you can reach your files from any pc with an internet connection. The only thing it doesn't do is keep a history of your files so you can't retrieve an older version of your document, for that you'll need the the tools from the following section...

Versioning
If you want to keep track of previous versions of your documents (code, graphics,...) you'll need a versioning tool. Most free solutions are based on Subversion, this is an open source source-control system. This is a bit more technical to implement but not to difficult. You'll need a hosting company for your repository and one or two client applications.
XP-Dev has several plans to host your repository including a free one. Once this is set up you'll need an application to retrieve and commit changes from and to your repository. TortoiseSVN is a free tool that integrates with the file explorer and if you're using Visual Studio to do the coding you can use AnkhSVN to integrate with the IDE.

Information
In the course of the project you will probably also do a lot of research and information gathering. This will not always happen in a structured way, you'll want to gather the information first, analyze it and then maybe give it some structure. THE tool for this is Evernote, it runs on every platform and it has a handy browser plugin that allows you to store chunks of information from a website directly in your Evernote notebook. If you use it on your PDA you can take pictures with it and when it gets synced to your notebook it also gets indexed with OCR.

Motivation

Now comes the most important part, delivering the actual project. This might sound easy in the beginning but after a few weeks or months you might get a bit demotivated, distracted with other things. Basically you lost your motivation, this can easily happen when you're working alone on the project. In a group this will happen less likely because you keep each other accountable for the progress and result, of course working with other people (friends, family...) will have other impacts or difficulties on the project but those are outside the scope of this article.

If you're doing it on yourself try to find somebody that will keep you accountable. Also try to use that person as a mentor, someone who has an opinion and ideas. Don't ask somebody who is too nice, it needs to be somebody who will chase you if you don't deliver.

Another way is to promote your product/service when it's still in its concept or development stage. Write blog about your progress, twitter and facebook it. Don't be affraid to share your ideas and progress. This might create a community from which you can get fresh ideas and input from possible clients. This will also make you accountable to the whole internet :-)

Wednesday 9 September 2009

Understanding SOA - Introduction

Service-Orientation, Service Oriented Architecture, web services, if you're not using the word service you're just not cool!! :-)

As explained in my previous post I'm currently preparing to get SOA certified and so it might be a good exercise for me to talk about service-orientation and SOA in my own words. To keep it readable this will be done in a series of articles, each focused on a specific topic.

Before I start the first article I want explain a naming convention. In a lot of articles and books the term "SOA" is used while they are actually talking about Service-Orientation (SO), SOA is actually part of SO. Mainly I'll be talking about SO but to keep things simple I will also use "SOA" for both definitions.

Introduction to SO(A)

SOA ≠ web services and you're not obliged to use web services to implement SOA. Are web services the best way to technically implement SOA? I'm confident to say yes but I do want to stress that web services are only the technical implementation of a service-oriented design. To make it short, it's not because you're using web services that you are doing SOA. Think of services as a collection of capabilities focused on a certain topic, this topic could be a business entity, a business process... (Invoice, Accounts Payable,...). In the next article(s) I will talk in more detail about services, their design and principles.

SOA is also not a pure technical idea, it doesn't only concern developers or architects. It concerns the business of the enterprise, short (tactical) and long (strategic) term goals, SOA can define how a WSDL will look like but it also defines who has access to technical documentation of the service, SLA's are also part of SOA.  Don't think of a SOA implementation as a single project within the company, each project should strive towards and contribute to a global SOA within the enterprise.

SOA is about centralizing "logic", making it available through standardized interfaces, managed by a centralized governance and has as purpose to deliver strategic goals and benefits to the company.

Standardized interfaces are very important as it can lighten the integration burden that exists in enterprises that use different development environments (.net, java...) and different application vendors (SAP, Microsoft...). In the case of web services these standardized interfaces will be WSDL for the service contract, XML and XSD for type declaration and WS-* standards (policy, reliability...).

The governance is responsible for how services are designed, developed, published, versioned and for standardizing the internal process to deliver those activities

Reaching SOA "utopia" is an evolution, most of the time you will start by using web services to connect or integrate with different applications, then service contracts will be more formally standardized, as the service inventory grows the need for governance over this will become mandatory to successfully maintain, evolve and version the inventory. But it's not necessarily a natural evolution, planning and preparation, such as an inventory blueprint, are needed for a successful evolution.

Let's have a look at some of the goals of SOA...

  • Increased Interoperability

    By consistently applying service principles and design standards (standardized contracts...) services are automatically interoperable. Because of the interoperability, integration processes start to fade. Services can be used and composed more naturally even if they were created by other teams/projects or if they were created in the past.

  • Increased Federation

    This means that applications and resources are united/composed but still maintain their autonomy and self governance. As with interoperability, the application of principles and standards is needed to achieve this unity.

  • Increased Vendor Diversification

    By designing a neutral service oriented architecture (i.e. web services) an organization has the possibility to choose the best products from different vendors. This gives the options to extend, change or replace vendor implementations without "destroying" the global architecture.

  • Increased Business and Technology Alignment

    To create the correct levels of abstraction and to determine service candidates the deep involvement of business experts is mandatory to create services that can withstand change and that can be recomposed if needed to follow the business changes.

...and now the benefits...

  • Increased Return on Investment

    As isolated applications need to grow and evolve over time so does the complexity and cost of managing the application. SOA advocates creating agnostic services that can be (re-)used and composed for different purposes. The initial creation of this piece of logic will have a greater cost compared to the creation of a classic application but it will be better positioned as an IT asset that will reduce the cost of change and evolution over time.

  • Increased Agility

    As the  service inventory grows over time with more and more agnostic services that don't belong to a certain application but are a real IT asset, IT can adapt more quickly to changing or new business requirements.

  • Reduced IT Burden

    As the SOA infrastructure grows and matures IT can focus more on adding value to the business and less on plumbing and integration. This will also reduce redundancy, overhead, size and the operational cost of IT withing the company and it increases efficiency and agility.

This was a little introduction into the what and why of SOA, the next articles will go deeper into the design and principles of services.

Thursday 20 August 2009

Studying towards Certified SOA Consultant of SOASchool.com

I've been interested in SOA and web services for years and to make things "official" I've decided to get certified in this area. After looking around for the possibilities I decided to take the certification of SOASchool.com. Why did I choose this "vendor", it's based on the excellent books of Thoma Erl and it's technology agnostic. The fact that it's technology agnostic is very important to me, SOA is a lot more than generating some web services from a development tool.

So the plan is to become a SOA Certified Consultant by the summer of next year, we'll see in a few months if this is too ambitious. I received the self-study kit and text books this week, delivery took about 10 days (from Canada to Belgium). Every exam kit includes a printed version of the course presentation and some sample questions, self-study guide that links to the book chapters you need review for the exam, audio tutor cd's, flash cards and a Prometric exam voucher. For the complete contents of each study kit go here. As mentioned in the first paragraph, the exams are based on the books of Thomas Erl so you'll also need those. The first exam (S90.01A) uses the book SOA Principles of Service Design, for the full Certified Consultant track you'll need these 4 books:

For the full exam/book correlation go here.

I'll keep this place updated with my progress and my opinions on the contents and exams as I progress. If you're interested in other SOA certifications you can have a look at an article of Eric Roch.



Tuesday 4 August 2009

Web Client Software Factory (WCSF) - reusing views PART 2

Here is my solution for the problem explained in the previous post.

So the problem was, how can you reuse views (aspx pages) in different controllers (processes, pageflows, ... whatever you want to call them)?

I'm still using the standard Model-View-Presenter-Controller pattern used by WCSF but I'm abstracting the controller part from the presenter and I'll be passing the view (through it's interface) to the controller.

ICanHandleView<TView>
For every view the controller can handle the controller will implement an interface ICanHandleView<TView>. This generic interface has two methods, HandleView(TView view) and FillView(TView view). FillView will be mostly called when the page is loaded to fill the view with state information and HandleView will be called when an action occurred (e.g. a button click). In the implementation of HandleView you take the data from the view, store it in the controller and then decide to which page you will redirect the user. So basically the Presenter is just there to translate actions of the UI into calls to the controller.

BasePresenter
When you add a page with WCSF it will also generate a presenter that inherits from Presenter<T> where T is the interface of your view. I've created a class BasePresenter that inherits from Presenter<T>. BasePresenter has a property Controller that returns a ICanHandle(TView), behind the scenes this property uses a static class ControllerFactory that creates a new controller or correlates the current request to an existing controller. So, when WCSF created your presenter you just change the Presenter<T> it inherits from with BasePresenter<T>.

ControllerFactory
This little workhorse is responsible to do the correlation between a request and a new or existing controller. Actually ControllerFactory is just a static class that will instantiate the real factory, in my case WebControllerFactory. This was done to abstract the asp.net infrastructure from the rest of the system as the WebControllerFactory will use the HttpContext to do the correlation.

I hope I can make this all a bit clearer with the following class diagram:

(click to enlarge)

Correlation
The correlation strategy of my WebControllerFactory is the following:

(click to enlarge)

red dots: flow when the first page of the process is first requested
green dots: flow when the first page of the process is postbacked
blue dots: flow of all the following pages in the process

The reason I use the hidden field is to avoid that on a postback, of the first page of the process, a new controller would be created.

Some technical details:
When a controller is redirecting to the next page it should add the "flowid" parameter to the url. To get to the page object of a request, to add or read the hidden field value, I use HttpContext.Current.CurrentHandler, this is a IHttpHandler that can be cassed to a System.Web.UI.Page. To instantiate the correct controller factory and controllers I used Unity, the details of this I leave as an exercise to you the reader.

All of this might seem a bit complicated but once this is implemented it's really easy to use:
- generate your pages and presenters with WCSF
- write the code of your controller, unfortunately you still have to do this yourself
- configure unity
- change the base class of the presenter to BasePresenter<...>
and it's ready!

If something is not clear or if you would have a better way to do this please let me know.

- page 2 of 4 -