posts - 276, comments - 106, trackbacks - 126

My Links

News

My main blog url now is: weblogs.asp.net/meligy

Twitter






Tag Cloud

Article Categories

Archives

Post Categories

BlogRoll

About Me:

Monday, December 29, 2008

dotNETwork 10th: Architecture Speaking for Itself (DI / AOP)

As ever, there’s

The usual intro …

The .NETwork day for December that took place this Saturday as the 10th group gathering/event was pretty much worth being the day that makes a whole year for .NETwork group, which started December 2007. The day was pretty much different than usual, maybe similar to the very first gathering in organization, and some other days in topic, but the style and taste was a bit different. Pretty much concentrated, although on a variety of topics.

The day was just a couple of sessions. Love it or hate it, no parallelism there. The sessions were given by a single speaker, Omar Besiso, a half Egyptian senior Architect living in Australia, a consultant, Tech Ed presenter, book editor and reviewer – a very great guy as I’ll explain later :).

Actually I really enjoyed the first session. Really want to attend / give many similar sessions in the future.

Warning:

I have not been very honest while writing this! Since I have a similar interest in the topics discussed during the session, I have written some parts of the post that were not said during the presentation the same way,a and provided some examples and such that represent my own understanding which may or may not be the same as Omar’s.

Lets give it a strong start :-) …

… On Architecture

“Who here is an architect, or works as an architect?”

Having a very quick meal just before entering getting us exactly a minute late (me and Mohamed Samy, my dear friend, without getting lost in the way this time), and before we finish plugging in our laptops and firing OneNote, we were hit by the question as the true start of the session.

Of course I and M. Samy stood for it. This led us to talking about what an architect does exactly. the short answer is “everything”. He designs applications, interfacing between those applications. He meets customer. He still writes code and maybe Prototype or Proof of Concept. But there are types of software architects:

  • Solution Architect: Close to the team decided to work on the solution, performs architecture for a specific solution.
  • Enterprise Architect: This is the one that does everything communications to the office boy and to the CEO. In other words, he handles the solution from the very beginning of whether to have a single solution or series of connected ones.

That talk was before Omar introduces his work-in-progress book “Reactive Programming & Domain Driven Design”, speaking on himself as a “Not technologist.,, but very low Java IQ” (It was interesting to know such exists!). This means that he has no special feeling about any specific .NET technology, or a language, and this is very important, to be able to mentally choose the right technology for the right situation (he made another statement that he uses SharePoint whenever the budget allows, plain ASP.NET only otherwise, which is another interesting topic). However, this is all on top of the .NET platform, as “The technology-Independent architecture that we heard of in the 90s is no longer a fact”.

… On Architecture Myths and Data Driven Architecture

Those are the things most people believe in and do, while are no longer relevant to today’s and future architecture.

  • Myth No.1: 3 Tier Architecture
    • You know this  UI –> Business -> Data thingy!
    • Of course we today know we need other layers
    • How about logging, where does it fit here. Object Pooling, etc…
  • Myth No.2: N Tier Architecture
    • There are so many styles, but usually that’s what it ends to: UI -> External Service –> Business –> Internal Service –> Data
    • The point is, as in the next myth, that is all goes in circles around data.
  • Myth No.3: Data Driven Architecture
    • Bring the DB, fire up the DAL generator, build some “business” that just calls this and bake some UI for it.
    • The argument here was: what if you do not have exactly a database. How about things like Office or Photoshop or so.
    • “We use CodeSmith/.NETTiers as our architecture” What a statement. Is code generation exactly an architecture?
  • Myth No.4: Architecture and design are an overhead
    • Architecture is like an investment. Omar quotes: “If every investment is an overhead, it’s time to sell your assets”. To be fair, I mention he has been working with big projects of hundreds of developers still in one project.
    • The point is about maintenance and updates that takes most of the real time of a project. It’s about responding to change, and the time it takes to actually do respond to that change.
      • For example, for an interest rate value to change, this may be as easy in your design as changing a configuration value, but, how about changing the way this interest rate value is used or the interest way of calculation?
    • Side Arguments:
      • A bad architecture can cost an entire rewrite of the whole solution from scratch not even parts of it. Sometimes if things go bad such a decision is the right one to have.
      • No university on earth teaches the “right” software engineering! Even MIT has hundreds of methodologies, that you don;t know which to follow.
      • “Do not let a software engineer build your house”, you cannot afford a bug or rebuild in there ;).

Clearly, Omar is against the Database-First approach. I heard the same things many time on ALT.NET threads, and it takes many posts to talk about without much benefit, but anyway, Omar’s main argument is that you heart your model (say the classes you use to represent types of business objects, like “Product”, “Customer”, etc) so much when it is just a representation of your database row.

If you change a column in your database for whatever database performance reason, and the model class is a serializable one, and then you de-serialize an objec serialized before change. How will you manage that? (I actually had the same exact situation before, with an object serialized to be persisted in Windows Workflow and de-serialized after months where the class changed due to coupling to the DB).

… On General Guidance

Here came some general notes on achieving in software. Software NEEDS to be (just as in those old computer science books):

  • Highly Cohesive
  • Loosely Coupled
  • Hardware Independent
    • Not that it works on PC and Mac :)
    • But that it (as much as possible) works on 1-processor single machine to a farm or cloud of servers with so many logical and physical processors in them.
  • Reliable
  • Performing
    • Concepts have changed here. People now no longer apply a rule like “reflection is too expensive to use in our applications” (and many great things we see today use reflection heavily in their core)
    • Odd enough but works: In many situations, when you have issues with performance, you just put more RAM (Hardware in general) into it until later you fix/re-factor. Hardware is cheaper than programmers.
  • Maintainable
    • This is what today’s designs and patterns focus on most.

In general, software is developed to fulfill certain needs. It need to be architected and planned to fulfill those needs. Software needs to be:

  1. Envisioned
  2. Planned
  3. Executed
  4. Adapted

… On Layering With Recent Architecture

Then Omar went on talking about architecture in a bit weird way. He went through architecture of the future, and afterwards, of today.

Here’s how he sees architecture of the future:

  • Subsequent of the past
    • New Tools, Old Patterns
      • Design patterns have been there for years.
      • The best way to describe Service Oriented Architecture (SOA) is in terms of component oriented design, the same concepts of the old COM+.
      • Service Locator and Dependency Injection are just glorified factory patterns.
  • Destruction of religious discussions
    • Religious Discussions
      • Dynamic Queries vs Stored Procedures
      • C# vs VB
      • Plain ASP.NET vs SharePoint
      • …..
    • As mentioned before, do not special feelings about a certain technology.

To reach this, that’s how an “Architecture of the Present” consists of for Omar:

  • Consumer
    • ASP.NET, WPF, …
      • Note that a WCF service that depends on another service or solution is also a consumer of that
    • Needs to talk to black box that has the engine
      • Knows nothing about implementation, just a contract
      • Normally you should be easily swapping implementations (contents of the black box) while keeping the interface(AKA, the box).
      • Black box is only DLLs, with no tech, not It’s not SharePoint not anything, the only dependency for it is .NET framework.
        • I asked Omar how do you test and mock work that you do in MOSS (SharePoint), he said that it’s usually just dump code that calls WCF services that are actually the front faces of all the real operations.
  • Domain
    • Entities and Services
      • Entities are the model, again, the “Product”, “Customer”, etc. To explain I tell you they do NOT contain anything except their own knowledge. No persistence or such.
      • Service are:
        • Data Services (“UpdateCustomerRecord”)
        • Business Services (“CalculateDailyReport”)
  • Core
    • The very basic entities and interfaces for the services
    • The contracts live here, the implementation goes to the domain.
    • Say this is a VS Class Library Project. Then this will be the only Project that does NOT depend on other Projects in the Solution, and mostly all other Projects will be depending on it.
  • Aspects
    • Cross Cutting Concerns, the things you perform/need for almost every solution
      • Validation
      • Security
      • Logging
    • They should be implemented in a way that provides consistency path. So that developers are not confused when writing it.
    • Omar says those should be injected. We’ll see how next.
  • Only now after defining those, Omar tends to create the database.
  • Then comes the actual service implementation.
    • He uses dependency injection to makes the consumer just calls the domain via the contracts (interfaces) to and then the implementation gets injected.
    • For Aspects, he uses Aspect Oriented Programming (AOP) / Policy Injection to save the developer from writing those for every method / property.

… On Dependency Injection

Dependency is about interface oriented programming:

  • The Core will have its IService interface
  • The domain will have its ServiceImplementation class that implements the interfacen.
  • The consumer will NOT reference the domain directly. It’ll call “something” called Dependency Container that returns an instance of that interface.
  • The container is then configured to return an instance of ServiceImplementation whenever it’s asked for an IService.
  • Normally you wouldn’t have interfaces for entities (just the services).
    • So, you might not have IProduct interface, but most likely you have an IProductRepository (a data service for Product).

Think of contracts for your day-to-day services. Say a Plane Ticket. This is an API, an interface. It has Date, class of food provided, flight no., etc…, but it knows nothing about the exact physical plane that will hold this number, how it works, or the name of its captain, because this is all implementation detail.

This guarantees ease of changing the implementation (say replacing the plane itself). Services need to be designed by the architect. Of course they all reference the core (which holds the contracts), hence you can easily have other service implementations later.Note that the entities implementations are just testable unit/implementations on their own with no special dependency/reference

Again, the cores references nothing,and most other layers reference it. That’s why internal dependencies need to be defined. This is what products like NDepend provide today and what VS 2010 is going to have built-in.

… … The Service Locator

This is just a factory. It’s job is to locate the service implementation (I’d ask you to imagine a GetProductService function with return of type an IProductService as a service locator). That’s how the consumer never talks to the domain. It calls a Service Locator to get a reference to the service without knowing anything about the service except its interface that lives in the core.

There’re two ways the locator can locate and return the desired service. The service type may be written down in some configuration file and it uses reflection or so to get it, or it can perform some other code logic to get the service (which can be as easy as loading some service assembly and getting a specific class from it).

There is no standard for implementing the locators. You may want to provide a singleton object (have a single ProductService and return it every time an IProductService is requested rather than creating a new object for every call). You may want to cache the object for a certain period.So, implementation does differ.

… … The Dependency Injection

What dependency injection adds to implementing a service is:

  • Standard
    • You have a certain library that you call to get the dependency (service). You configure this library for your specific needs.
  • Turns Service Locator into Glorified Smart Factory
    • It can do more functionality, and it has been tried.
  • It can crate an entire chain of objects, not just one.
    • What if you have (and this is not an accurate example or best-to-do) an IOrderService that has one property of type IShippingService, and you want to create the order service and the dependencies of Order service itself. A dependency container library should provide you with a way to define in the same place what order service to use, and what shipping service to use with this specific order service.
  • There’re main libraries for it
    • Castle (Windsor)
    • Structure Map
    • Spring.NET
    • Enterprise Library (Unity)
  • The style is simple, you have a component (any kind of consumer code), it calls a configured dependency container, and this container returns a ready-to-use instance.

To demonstrate this, Omar presented a demo of an IProcessor interface with only a single method: ProcessMessage and a single property SubProcessor of type ISubProcessor, ISubProcessor also has a single method ProcessToConsole. Each of the methods takes a single parameter “”Message” to process.

Now the service factory is easy to create. Using Unity, that’s just a few lines of configuration copied from documentation. The implementation is pretty easy too. Just write the classes Implementation1,Implementation2 that indicate (by simple writing to Console) they were created and called and then pass the message to the sub processors, SubImplementation1, SubImplementation2 that also just indicate they were created and called.

The console program that acts as a consumer was also easy. It has some code like:

IProcessor processor = ServiceFactory.GetProcessor();

processor.ProcessMessage(“The message”);

So, hrere you seethe consumer just talks to the service locator. In the app.config file we tell what implementation to call when asked for IProcessor and when defining that tell it also what to return for ISubPorocessor. To demonstrate, Omar showed calling Implementation1 with SubImplementation2, Implementation2 with SubImplementation2, and even showed that Implementation1 with SubImplementation2 would just work. And run this on the console to see it actually did work.

… On Policy Injection

As mentioned earlier, the policy injection is a pattern that handles cross cutting concerns, the normal things in all projects. Exception Handling, Logging, and Exception Handling would make it for great examples. They’re things shat we shouldn’t be writing code for them everyday!

The way you do this is by using a global handlers that you inject them (say as you do in dependency injection or by putting Attributes on the thing you want to inject into, which is [in OVERLY simplified manner] Aspect Oriented Oriented Programming). Then have then create events that you implement handlers for. Those handlers become the single place to write your policy code (the logging, exception handling, authorization check, etc..).

There are of course frameworks that help you doing this:

  • Castle (Windsor)
  • PostSharp (Code Contracts in .NET 4)
  • Enterprise Library (Policy Injection Block)

The idea of using is similar. The consumer creates object from a factory, then this instance gets a proxy class created around it (similar to the proxy class that gets created when you have a plain old ASMX web service, anyway, it depending on the library and whether it works in runtime or compile time) around the object, and have events in every property/method in that proxy, then others can subscribe to those events later to inject their policies.

To illustrate, Omar presented another demo. He had a Calculator class (that of course implements an ICalculator) with one method SubtractTwo(number) that just does as its name says (subtract 2 from the given parameter), and showed how to use the Enterprise Library Policy Injection to put a logging handler for it that was set in conifg for all objects of type ICalculator. That’s how the policy is applied to all objects from configuration while the consumer got the ICalculator object itself normally by asking a service factory to create it.

So, as per Omar, that’s how you would do it (like other parts in the post, made longer to illustrate more):

  • Configure what implementation to attach for the specified contract
  • Configure what aspects to to have along with entities and services that implement this contract
  • Create the the actual implementation of the attached service
  • Wrap it with the chosen aspects.

Omar also showed another demo. A real life code from a real customer (one of the big customers he has been working with). We saw the –now– normal stuff, the core that references no one (with interfaces, aggregates, and service contracts in it) , the services either business (which We things like SomethingEngine or SomethingManager,…), or data (which were called Repositories – as usual in similar architectures).

… On Summing up

On summing up,Omer emphasized:

  • Do not code logging (and such) over and over again
  • Watch for performance, moderately
  • Go for standards
    • Use Standard Frameworks, not no name ones (DISCLAIMER, that’s Omer speaking).
    • Standardize your own frameworks.

I have the feeling that I didn’t include everything here, especially some side talks that were worth noting (some are noted). It was a great session with some discussions that are rarely there except in very small groups. Again, I really want to bring similar discussions, either as a speaker or an attendee.

Then came the open sesion …

Well, This one was an open session. I haven’t seen a “bad” open session in Egypt, but also never saw one that would meet my standards for “Successful”, “effective” or such …

There wasn’t much audience this time (Which is really funny and always happened! Seeing that a vast majority of the attendees are students, when the sessions are prepared to meet this level, the audience that attends happens to include many high rank developers. As you may have guessed, when the sessions are prepared to meet this advanced level …. Yeah, only the junior ones are there. This is another post on its own!).

This time the audience was ready for the session but much fewer than it should have. The open talk session didn’t have much talk then more than a demo that shows Tech ED domo on how to use the MS Reporting Services 2008 Report Viewer to create a report from scratch, publish it to your server, and export it to MS Word n less than 5 minutes. Not something that would impress me personally when it has the “less than 5 minutes” in it and Omar himself said a simple report in reality would take around half an hour to design.

The other talks were all like “”What do you think about using the X… technology in Y…. situations”. It was limited to one-hour session anyway due to accidently tight buses seclude.

Some things that are good for example are mentioning the models of doing software in/outside the cloud (topic brought by Mohamed Samy).Omar said those are the common themes:

  • I build software and build data
  • The two at Microsoft (or whatever provider)
  • Data is here but the software is by another provider
  • Data by vendor and he's liable to it
    • By looking at the terms and statements of Windows Azure, Omar says he found nothing that expresses liability from Microsoft’s side.

Also, when someone asked him whether to use WPF or Win Forms for desktop “Business” applications. He said he uses WPF for all his applications, for business applications he has a WPF theme that looks just like Win Forms. He explains why he does it this way:

  • WPF works directly on the GPU.
  • XAML is a great language, same like HTML but without all the browsers headache and even better syntax.
  • Basically a business application does not have complex UI requirements, but, if some are requested, a WPF application is ready.

He also mentioned the best way to learn .NET is to open reflector, browse the namespaces and see the code for anything whose name grabs your attention. An example is how Serializable attribute is implemented, it’s just an enum :). another example is how to implement an Object Pool. So that for example whenever an object is requested, no more than say 5 instances are created and reused in later requests. Before you think about the implementation, it’s just there in the BCL,in System.EnterpriseServices.ObjectPool. Just have an ObjectPool with Max set to 5 and you are done with it :) :).

It was a really great day. Thanks a lot, Omar.

 


Cross posted from weblogs.asp.net/meligy


posted @ Monday, December 29, 2008 4:11 AM | Feedback (0) |

Sunday, November 30, 2008

Slides for dotNETwork 9th: Applying DDD on Asp.net MVC – Part 1: Asp.net MVC

Thank you all for attending my “Applying Domain Driven Design on Asp.net MVC” session. It’s interesting how things went that we got a bit deep into the ASP.NET MVC framework and have achieved the geeky talk goal via covering the other aspects of ASP.NET. Even that this took the entire session, it is nice that it could benefit the attendance.

I am not sure whether we can arrange another session for Domain Driven Design fundamentals and combining that in the same project while using the MVC pattern and ASP.NET Framework. If you are interested in a similar session, please contact me via this blog or email.

Session Slides

Here are the slides for this session:

Sample Code

For the HaackOverflow code sample and another great presentation about ASP.NET MVC, check the PDC 2008 session: “ASP.NET MVC: A New Framework for Building Web Applications”.

Related Sources


Cross posted from weblogs.asp.net/meligy


posted @ Sunday, November 30, 2008 9:41 AM | Feedback (0) |

Saturday, November 15, 2008

dotNETwork 9th Gathering: Domain Driven Design, ASP.NET MVC, you know, tada tada…


Update

Presentation slides and sample are now available. Please click here to find them!


Poster Yeah, somehow dotNETwork decided to allow me to show all my psychopath about design and implementation in a session with a very weird long title, “Applying Domain Driven Design on ASP.NET MVC”.

Yeah, two unrelated topics. In 2 hours frame, I should be introducing day to day development styles from a different perspective. I had a small talk about the process side of the world. This time we move towards the other areas related to architecture and design.

About the event

dotNETwork is an independent .NET user group in Egypt. They organize a semi-monthly FREE event about various .NET related topics. This is going to be the 9th gathering/event. I have delivered a couple of sessions there before, about Scrum for developers and Design Patterns in C# 3.0.

This time the event will be:

At: Saturday, November 29th, 2008. 12 PM to 4:30 PM

In: CIC Canadian International College

Busses Availability: @ Nady El Sekka, Nasr City (11:00 AM to 11:30 AM)

This is the event agenda, note that session videos will be recorded:

12:00 – 14:00

Applying Domain Driven Design on ASP.NET MVC

Mohamed Meligy
Senior Software Developer,
Raya-Software

Information Architecture

Mostafa Mourad
Team Leader,
ITWorx

14:30 – 16:30

IIS 7

Hossam Kamel
Senior Software Enginee,
ITWorx

BizTalk-SharePoint Integration

Hossam El-Deen M. Barakat
Senior Software Developer,
Raya-Software

The sessions are all really great. Again, the parallelism hits me once more. I know almost all the speakers, Maybe I don’t know Hossam Kamel that well, but I heard very great things about him from friends. While on the other hand Hossam El-Deen M. Barakat will be giving a session that I attended the smaller version of it in Raya. IT was more than great explaining things I thought were too complex that just happened to be so easy, and … Man, I know I must attend the complete one. But this is special to me because I have hit so many IIS 7 issues before and played with its various interesting features, so, maybe my choice is not the best for you.

The one I really regret to miss is the one Mostafa Murad will be delivering. Once more I’ll have to do much effort to prevent myself from leaving my own session and go attend the session in the other room!!

I expect it to be a super great day.  The session topics and speakers are of a very high quality, yeah yeah, except that white guy in the beginning called Meligy or Something and his weird session :).

About the session topic(s)

Domain Driven Design

Domain Driven Design (DDD) is a thought paradigm. This means it is a set of thoughts to have in your mind when designing software. This usually has its effect on how you organize your layers (and question yourself whether the 3-tire typical model is truly the right answer), and affects also how you write different pieces of functionality in your code (which happens to meet some OOP principles that are not emphasized usually in day to day work). It also introduces some other concepts like Dependency Injection (DI) / Inversion of Control (IoC).

ASP.NET MVC

One of the patterns that fit pretty much within DDD style is Model View Controller (MVC) design pattern. The idea of having some way to represent business entities in a way independent from technical operations calling them Models is the shared part, having a core business flow and control in the Controllers, and a dumb View that only gets the model from a controller and knows nothing except how to display it properly. There have been some famous MVC frameworks in the world that were built to make it easy to develop applications applying the MVC style. The one that was highly noticed was one called Ruby on Rails. Microsoft has recently developed its own MVC framework calling it just as it may sound: ASP.NET MVC Framework.

Wrapping Up

So, during this session, I’m going to try to touch the surface of both the concepts and tools and how they all play together. Of course I will not be able to go deeply in any of them because each requires a separate session,but just introducing the mindset and throwing out some names will be something for the session time. My purpose is to get you leaving the session, and opening your favorite search engine looking for more information about the topics.

Conclusion

If you have some time to invest,go see those great guys. If you have sometime to waste, come to my session and lets go crazy together :).

If you decide to attend the gathering,please mark yourselves as attending in the facebook event page, so that the organizers can estimate the number of attendees.

Related Pages:


Cross posted from weblogs.asp.net/meligy


posted @ Saturday, November 15, 2008 2:03 PM | Feedback (0) |

Wednesday, October 29, 2008

Windows Azure, A letter from Steve Ballmer

Another email to share with you, “A Platform for the Next Technology Revolution” :

During the past decade, a dramatic transformation in the world of information technology has been taking shape. It's a transformation that will change the way we experience the world and share our experiences with others. It's a transformation in which the barriers between technologies will fall away so we can connect to people and information no matter where we are. It's a transformation where new innovations will shorten the path from inspiration to accomplishment.

Many of the components of this transformation are already in place. Some have received a great deal of attention. "Cloud computing" that connects people to vast amounts of storage and computing power in massive datacenters is one example. Social networking sites that have changed the way people connect with family and friends is another.

Other components are so much a part of the inevitable march of progress that we take them for granted as soon as we start to use them: cell phones that double as digital cameras, large flat-screen PC monitors and HD TV screens, and hands-free digital car entertainment and navigation systems, to name just a few.

What's missing is the ability to connect these components in a seamless continuum of information, communication, and computing that isn't bounded by device or location. Today, some things that our intuition says should be simple still remain difficult, if not impossible. Why can't we easily access the documents we create at work on our home PCs? Why isn't all of the information that customers share with us available instantly in a single application? Why can't we create calendars that automatically merge our schedules at work and home?

This week at the Professional Developers Conference (PDC) in Los Angeles, we shared news with software developers about a new set of platform technologies that will help transcend these limits. Because you are a subscriber to Executive Emails from Microsoft, I wanted to share my thoughts about the impact that these technologies will have as developers begin to use them to create a new generation of experiences that extend uninterrupted from the desktop to the mobile phone, media player, car, and beyond-to places where we never thought information and communications would be available to us.

A New Platform for Cloud Computing

At PDC, we announced the availability of an early preview release of a new technology called Windows Azure. Windows Azure will enable developers to build applications that extend from the cloud to the enterprise datacenter and span the PC, the Web, and the mobile phone. For the first time, we shared pre-beta code for Windows 7 and for Windows Server 2008 R2. Windows 7, which is the next version of the Windows desktop operating system, will take advantage of software and hardware advances to help eliminate the boundaries between information, people, and devices.

We also previewed Office Web applications, which are light-weight versions of Word, Excel, PowerPoint, and OneNote that are designed to be accessed through a browser. Office Web applications will be part of the next version of Office and will enable people to view, edit, and share information and collaborate on documents on the desktop, the phone, and in a Web browser in a way that is consistent and familiar.

Windows Azure is part of the Azure Services Platform, a comprehensive set of storage, computing, and networking infrastructure services that reside in Microsoft's network of datacenters. Using the Azure Services Platform, developers will be able to build applications that run in the cloud and extend existing applications to take advantage of cloud-based capabilities. The Azure Services Platform provides the foundation for business and consumer applications that deliver a consistent way for people to store and share information easily and securely in the cloud, and access it on any device from any location.

Windows Azure is not software that companies will run on their own servers. It's something new: a service that runs in Microsoft's growing network of datacenters and provides the platform that helps companies respond to the realities of today's business environment, and tomorrow's. Windows Azure technologies are already finding their way into products such as Windows Server 2008 and System Center Virtual Machine Manager, enabling organizations and Microsoft partners to create their own cloud infrastructure.

Windows Azure will enable organizations to respond to realities such as the need to use the Web to provide customers with comprehensive information and to interact with an audience that has the potential to expand exponentially overnight; to integrate operations with partners-and sometimes even competitors-to meet customer needs; to add new capabilities quickly to respond to new opportunities; and to enable employees to work efficiently and effectively no matter where they are. These realities apply not just to businesses, but to organizations of all kinds: schools, governments, community groups, and more.

Traditional approaches to building technology infrastructure and delivering computing capabilities make it difficult and expensive to adjust to these realities. You need systems with enough capacity to meet the highest possible demand-capacity that includes servers and buildings to house them, the power to run them, and the people to manage them. You have to spread that capacity across locations so there's a backup if one part fails. You have to solve issues like access for different types of users and compliance with tax regulations in all countries where your customers reside.

Designed specifically to meet the global scale that today's organizations require, the Azure Services Platform will provide fundamentally new ways to deploy services and capabilities. It gives businesses the option to take advantage of the capacity available in the cloud as it is needed, reducing the need to make large upfront investments in infrastructure simply to be ready when demand spikes. It will enable developers to create applications that run in the cloud and provide the features, information, and interactivity that employees, partners, and customers expect-no matter how many of them there are, where they are in the world, or what device they have at hand.

Software Plus Services and the Power of Choice

The Azure Services Platform reflects our belief that choice is critical for developers, companies, and consumers. It is also based on our belief that the key to delivering value today and in the future lies in combining the best aspects of software running on PCs, servers, and devices with the best aspects of services running on the Web-an approach we call "software plus services."

Our software plus services approach lets people take full advantage of the incredible power of today's devices. While there are undeniable benefits to being able to tap into the wealth of information and services that can be accessed over the Web through a browser, the interactive experiences that people expect on their PC, mobile phone, and media player depend on sophisticated software running on powerful processors.

The richness of these experiences will only increase as multicore processors expand the computing capabilities of our devices and new programming languages open the door to a new generation of applications that let us use more natural ways to interact with digital technology such as voice, touch, and gestures.

Software plus services also recognizes that for most companies, the ideal way to build IT infrastructure is to find the right balance of applications that are run and managed within the organization and applications that are run and managed in the cloud.

This balance varies by company. A financial services company may choose to maintain customer records within its own datacenter to provide the extra layers of protection that it feels are needed to safeguard the privacy of personal information. It may outsource IT systems that provide basic capabilities such as email.

This balance will change over time within an organization, as well. A company may run its own online transaction system most of the year, but outsource for added capacity to meet extra demand during the holiday season. With software plus services, an organization can move applications back and forth between its own servers and the cloud quickly and smoothly.

Today, companies around the world are implementing Microsoft technologies to take advantage of the best combination of on-premise software and cloud-based services. Using Microsoft Online Services, businesses including Coca-Cola Enterprises, Blockbuster, and Energizer access and manage Microsoft Exchange, SharePoint, Office Communications Server, and Live Meeting over the Web through a single, secure infrastructure. In addition, 1 million people rely on Office Live Workspace for sharing and collaborating with friends, family, and colleagues.

Expanding the Definition of Personal Computing

Ultimately, the reason to create a cloud services platform is to continue to enhance the value that computing delivers, whether it's by improving productivity, making it easier to communicate with colleagues, or simplifying the way we access information and respond to changing business conditions.

In the world of software plus services and cloud computing, this means extending the definition of personal computing beyond the PC to include the Web and an ever-growing array of devices. Our goal is to make the combination of PCs, mobile devices, and the Web something that is significantly than more the sum of its parts.

The starting point is to recognize the unique value of each part. The value of the PC lies in its computing power, its storage capacity, and its ability to help us be more productive and create and consume rich and complex documents and content.

For the Web, it's the ability to bring together people, information, and services so we can connect, communicate, share, and transact with anyone, anywhere, at any time.

With the mobile phone and other devices, it's the ability to take action spontaneously-to make a call, take a picture, or send a text message in the flow of our activities.

Through Live Mesh-a service from Microsoft that we announced earlier this year and about which we shared new information week-we're beginning to bridge the PC, phone, and Web and create this next generation of connected experiences. Built on the Azure Services Platform, Live Mesh enables you to use programs and information stored on your work computer from your home PC, and vice versa. With Live Mesh, you can share folders and ensure that the information is automatically synchronized across your devices.

Live Mesh hints at how our lives will be transformed as the barriers between devices disappear and the option to connect instantly to people, devices, programs, and information becomes a reality.

We're not quite there yet. Today, the Azure Services Platform is available only as a limited technology preview release. But as developers begin to combine the capabilities of this new platform with the amazing ongoing hardware and software innovations that we are seeing from companies across the industry, it will bring us significantly closer to the time when information, communication, and computing flows along with us seamlessly as we move through our day-to-day activities.

You can learn more about these technologies and the progress we are making by visiting the Microsoft Software + Services Web site.

I look forward to sharing more information with you about these new technologies in the near future.

Steve Ballmer

Related Resources:


Cross posted from weblogs.asp.net/meligy


posted @ Wednesday, October 29, 2008 9:58 AM | Feedback (0) |

Tuesday, October 28, 2008

[IronPython] Announcing IronPython 2.0 VS10 CTP

I have found this email sent to the IronPython mailing list yesterday, and thought many of you would love someone to share it :).

Hello IronPython Community,

This is a special release of IronPython designed to work with the Visual Studio 2010 CTP.  This release will let you try out C# 4.0’s new Dynamic feature, which allows you to easily call into dynamic object models such as IronPython modules from your C# code.

To get started using IronPython with C#’s Dynamic feature:

1. Install this .MSI on your Visual Studio 2010 CTP Virtual PC image, either by enabling network access or sharing a host folder in Virtual PC’s settings.

2. In Visual Studio 2010, click the CTP Walkthroughs link on the Start Page and browse to the Visual Studio walkthroughs.  Follow along with the Dynamic Programming in C# walkthrough.

This release is not related to the recently released IronPython 2.0 RC1. In fact, this is based on source code from the beta4 timeframe. Also note that this release will only work with the VS10 CTP and not against any other version of .NET.

You can download the release here - http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=18448

The IronPython Team


Cross posted from weblogs.asp.net/meligy


posted @ Tuesday, October 28, 2008 1:12 PM | Feedback (0) |

Enterprise Library 4.1 Released

EntLib 4.1 was released yesterday. The new release includes:

  • Support for Visual Studio 2008 and Visual Studio 2008 SP1.
  • Interception mechanism in the Unity Application Block.
  • Performance improvements.
  • Usability improvements of the config tool.
  • Fixes.

For more information check any of the following Resources:

 

Technorati Tags: ,

Cross posted from weblogs.asp.net/meligy


posted @ Tuesday, October 28, 2008 11:21 AM | Feedback (0) |

Thursday, October 16, 2008

ASP.NET MVC Framework Status: BETA

Although I haven`t noticed any announced from the big names yet (see update 2 below), ASP.NET MVC BETA release is already online and available for download.

ASP.NET official MVC page and CodePlex site are not yet updated.

Will keep you updated when the announcements come.

 

Udpate 1:

You can find screenshots for the new release with some info in this blog post.

 

Update 2: Announcements have arrived :)

  • [MUST READ] Scott Guthrie has posted his announcement, with so many interesting details and how-to guides as you would expect him to.
  • From the ASP.NET MVC Framework team:

 


Cross posted from weblogs.asp.net/meligy


posted @ Thursday, October 16, 2008 1:35 PM | Feedback (0) |

Tuesday, October 14, 2008

Silverlight 2 Released Already

Official press release:

http://www.microsoft.com/presspass/press/2008/oct08/10-13Silverlight2PR.mspx

More information, resources, and download:

http://silverlight.net/GetStarted/

UPDATE:

Scott Guthrie’s announcement with –as usual- many important resources and interesting highlights/insights:

http://weblogs.asp.net/scottgu/archive/2008/10/14/silverlight-2-released.aspx

Scott Hanselman has an interesting announcement as well:

http://www.hanselman.com/blog/Silverlight2IsOut.aspx

 


Cross posted from weblogs.asp.net/meligy


posted @ Tuesday, October 14, 2008 11:39 AM | Feedback (0) |

Sunday, October 12, 2008

In Search For Agile Domain Driven Design … Hopefully Part 1 of N

The Useless Introduction You Used To :)

This post has taken so long to be started in writing. I’ve been busy with many events in my life lately. Suffering from frequent limited internet access lately, and, all this moving between companies thing has been eating me. And yes, I admit, I' have been as tired and more honestly lazy as you expected me to be!

Hey, there’s a little warning. This post is not exactly for my usual audience. I’m sorry, but introducing Domain Driven Design is not one of the goals for this post. There’re many interesting resources and books (even FREE: InfoQ, Domain Driven Design Quickly) on the topic. However, if you leave me a comment telling me to make a write-up on the topic, of course I will :) :).

One more thing. Another reason I’m working on this is that I’m preparing for an internal session here in Raya about Practical Lightweight Domain Driven Design. This session is truly internal yet. It should be recorded though but I’m not sure whether it’ll be possible to publish the videos (Yeah, I will see how we can have our public sessions of possible sure!). If you have a user group and would like me to give this session in a group meeting, I’ll be glad to do.

Introduction Still: The Messages, The ORM

This post was originally a couple of messages I’ve sent recently to the ALT.NET Yahoo Group. In which I discuss using Domain Driven Design with an ORM, more specifically, my favorite ORM, LLBLGen.

Quoting from the first message:

For now, we're going towards LLBLGen Pro 2.6 for DAL generation and such (using Self-Serving mode probably). Yes, we're going for database first design, and not using NHibrernate. I'm hoping that we can keep those two issues for other threads :).

Right now, I'm going for other Domain Driven practices. I want to make sure using POCO classes is worth it, and then see how to have those in LLBLGen (which -LLBLGen main template- is in its internal not much different design than Active Record, which in many times is handy, it's VERY rare t change DAL when one fits different DB providers with good performance), and what are common patterns to do Domain Driven Design at all when having LLBLGen as DAL (if it makes any difference - again: and if effort to make it encapsulated enough to make no difference is worth it).

Making this choice alone is worth its own article. Maybe should title it “In Search For The Perfect ORM” as well :-D.

UPDATE: Frans Bouma has a nice write-up about what is an ORM and different types on an ORM. It's quite old (2004), but the concepts themselves are still valid.

My original question was:

So, is anybody here doing DDD and uses LLBLGen as DAL generator ?How does the experience look like ? What are common practices across all projects and what have been pitfalls ? etc... These are the kinds of questions I'd love to see somebody here with something to share about.

Domain Driven Design At Work

This is not really an LLBLGen issue. It is questioning the Domain Driven Design productivity itself. I like DDD. I see it as the natural next step after 3-tier deisgn. This whole separation of concerns, models, repositories, factories, infrastructure, and services paradigm just fits my mentality and view of how the world looks like. However, not all the practices in DDD are similar in terms of return of investment, the customer business value that Agile emphasizes. The trick is to know which are and which aren’t, and how to do the balance.

In the second message, I go through an example of typical usage for DDD that has tried just a little bit to be lightweight in some areas but not others, and my own overview about what needs improvement:

 

I've been on a project that leverages DDD once before myself. The project has been frozen for a while for other priorities, etc...Maybe I start with my own take on the subject!!
 
We've been using the "Adapter" model. I thought it was for seeking some sort of more control/flexibility. Reading Fran Bouma’s blog (http://weblogs.asp.net/fbouma, the creator of LLBLGen), I see how he's so much of an "Entity Design" guy. Well, makes sense, he owns the best entity design I've seen so far having considered EF and CSLA.
Clearly he sees the "Self Servicing" as the core for entity design rather than model design. You know, the "entity.Save();" style. This makes me have two thoughts at a time actually. 1- That "Adapter" model is the right choice for DDD (I'll get to that just below), 2- That maybe DDD fully is not what I really want (the entity Self Servicing style is so powerful. It has saved my day so many times before).
 
Looking at the project I've been working on, We had something like those namespaces / VS projects (and others … ):
Company.Project.Adt (for models that may be reused in other projects, like Language, Currency, ...)
Company.Project.Model (for project business domain specific models)
Company.Project.Data (for LLBLGen stuff, we have also "DataDBSpecific" and such related to Adapter mode)
Company.Project.Repositories (have interfaces and implementations for repositories, let's put aside why the two in one project for now)
 
A repository load method could probably look like:
  Category Repository:
public static ReadOnlyCollection<Category> LoadByShop(Shop shop, bool includeDisabledCategories)
 
Or for internal use:
  Shop Repository:
internal static Shop Load(Guid shopKey, bool loadCategories, bool loadProducts)
 
What I want to highlight here is the "include...", "load..." parameters. I'm not sure whether this is the best way to do it.
 
Also, what really hits me is the mapping. You know, from LLBLGen entities to our domain models. We have been doing this in factories which live in the Repository space. Each factory had methods similar to this:
 
public static Shop CreateShopModel(ShopEntity entity)
 
public static ShopEntity CreateShopEntity(Shop shop
 
Regardless of the "public" access modifier (this is all very well hidden behind a service layer, but let's put the whole issue aside as well), the idea of having to go through all the mapping has been just a boring ugly task, that has been there for long.
To be honest, we didn't get so much benefit of it. It should have good promises, but how good compared to the cost of implementing them for complex object graphs ? That is the question!
 
Things got just worse when we wanted to implement our service layer. That's a service in the classic sense of "web" service layer (REST), we wanted to created DTOs that can correspond to XML and JSON responses of our choice, and again, we had to do the mapping from and to the domain models and DTOs. Want more ? The DTOs wouldn't convert to XML strings automatically (to JSON it would), we had to have another mapping layer from and to the DTOs and the actual XML.
Of course we had much time defining XML specifications and writing so many unit tests for this. I know not every project can go in this direction to this extent, but, I wanted to show where going in this path can take you.
 
So, even without service layer complications. You still have the model mapping tasks that (and this is what worries me) in many situations does not correspond to a "business" need. Note that I want to be doing Agile as well, and this makes the issue of delivering business value a true concern.
 
You can talk about automated generation for mapping. This may be something. We know it'll not be this direct or one to one of course anyway, but it may help.
 
Would you do Domain Driven Design with "entity" models assuming the developers will stick to calling the repository's "Persist" method instead of "entity.Save();"? You just can't do that! How about new developers ? How about inconsistencies ?
Is mapping really that bad and much of an effort ? First look at it, I say it isn't. But given complex scenarios I've been though I have to wonder about things like "complex object graph" and "caching" (in memory, on different levels, etc...).
 
It's all about trying to calculate the costs indeed.

 

That’s what I’m trying to make out of this, the trick for the right cost.

Conclusion: How About YOU ??

Let me repeat the end of those messages:

Anyway, would love to hear your takes and what you have :) :) :).

If you have any thought on the topic, those will be most appreciated. You can comment here or in the topic messages page on ALT.NET Yahoo Group. This is an open discussion area, and I do not expect it to be closed soon.

Same, if you want to hear more ramblings on the topic, or just want me to shut it up all, send me a line.

Would love to see what others have to say about this….


Cross posted from weblogs.asp.net/meligy


posted @ Sunday, October 12, 2008 7:00 AM | Feedback (0) |

Wednesday, September 17, 2008

Joining RAYA Software in October

I'm joining RAYA Software starting next month (October), part of RAYA IT, a business line of 3 main business lines that form RAYA Crop., a well known name in the IT industry over the Middleeast.

My role is very interesting. The entire company is interesting to me, not just for the size and brand, but for the nature of how things are going in there nowadays, which makes RAYA the perfect place to join at this specific time.

About the role

I'm joining RAYA with the same title I hold current, a senior software engineer, yet, I'm going to be a member of a team of only 3 guys, M. Yosry, whom I haven't met but is said to be a real guru by all guys I met in RAYA, M. Zahaby, an ex-RAYA returning in it recently and a personal friend of mine whom I had technical chats with and even worked with in a single freelance and knew what kind of a geek he really is, and myself!

The team is very special inside RAYA Software. We as team are responsible for helping other teams standardize coding practices all over the company (well, this is all within Microsoft technology development teams, I know nothing about Java technology department), and help other team leaders and members implement agile processes (specifically Scrum) in the way that fits work nature in RAYA. We stand with other teams in design sessions and researches/investigations required for specific projects, and we help create and enhance a rich toolset, reusable components and modules over applications. We work with all other teams and report directly to the "Microsoft Partnership Manager", El-Mohanned, who is like the CTO for Microsoft technology development, and a very interesting guy as a boss. Both very respectable, and still having his geek nature deep inside not affected by his current high management rank!

About the company

RAYA is a well known name in the software industry. Like many big companies, it had its special advantages, and eve problems. These days, the guys at the company starting from junior developers, the the GM, Aly Zweal (not sure of the spelling), whom I really enjoyed meeting him as a part of my recruitment process. The guy has a great smart mentality that measures the technical aspects to the business aspects for just the right balance, and whose meeting was as well as  El-Mohanned's description of the interesting job duties some of the main reasons I accepted the job offer.

Right now RAYA is going through some really revolutionary changes. The smallest of those are switching to Scrum and migrating many projects to using latest technologies and having a big yet very precise recruitment campaign. The company's line of business is rebuilding itself for more progressing forward, which makes it the perfect time to join and share in this building, especially when the role allows more impact on this process.

Regarding Agile, it's cool how El-Mohanned's first communication with me included a link to one of the two videos he uploaded to YouTube, "Raya Software Goes Agile":

 

This is the technical part, which is for someone like me a must-have base for having talks about anything else. But still, there's more about RAYA Corp. in general. Belonging to a big corporate is another paradigm that I lived some of its blessings in my previous company GNS (Gulf Network Solutions). Now, I'm into the full experience of living within a corporate environments. It just helps you think differently about your entire life, and opens new areas to think about. A worth-it experience indeed that many people once taste find it very hard to change.

 

Vacancies

Oh, yeah, by the way again, RAYA is hiring! I mean it. THERE ARE OPENINGS. There're openings for junior and senior developers, team leaders, and testers. You can check the careers page, and send your CV to the email mentioned under each vacancy, or to El-Mohanned, or simply to me! Hey, make sure to specify the position you are applying to in the email subject please. This is the rule, isn't it? :D

 

What about SilverKey?

That's what SilverKey is to me:

n740765313_203828_7496n730480176_239823_7977n740765313_203918_6807
n809505004_973575_6274n515300373_87642_5518n730480176_206747_8628
n623965496_769349_7057n740765313_2446638_1397n683805169_1004222_6615

Geeky days and even nights, company kitchen talks, volunteering entire public BIG free DemoDay events, pre release tools and platforms, varying nationalities, cultures and mindsets, wedding and birthday and even farewell parties, virtually wearing multiple hats at work(roles), analysis and design negotiations. launch celebrations treats, Scrum process customizations, teamwork, Dody and Alia's guitar, having breakfast in Ramadan tent, ...

There's much about SilverKey that I cannot explain by just saying. It used to be almost my house for more than two years now. I think I know about some of the people there more than I know about my own family and maybe same for them. There're people who sure have made a difference during this period, Dody and Kent come on top of those. There're guys who make for best friends like M. Nour. There're some special personalities that are hard to meet occasionally like Amir Magdy, H. Zein and M. Tayseer. There're people who are not just interesting as techies but have their own other interests like Ahmed El Malt and Tamer Zaki and Karim Ennarah. There're fun foreigners like Sharron, Tosin, and, very quiet yet still really fun foreigners like Brian, Chris, Luke, David, and Olivia. There are very passionate and promising guys like Kariem Soudy and Amr Ali, There're true fun guys like Mostafa Murad (AKA, TATA beik), M. El Sayyed (AKA, SAYYYED), Emad (AKA, iMAD), and M. Alaa (AKA, Developers friend). There're kind guys like Ibrahim Marzuk and Taher. There's an old buddy and community partner, Mohamed Hossam (AKA, BASHMOHANDES), business guys like Adam and Farid. And there's for sure M. Kassem and Ahmed Ali and so many names that it's easy to miss a lot of those over different generations (by the way, no categorization intended!). Although not so many of those names are still there today that most guys will not recognize the rest of all other names, this is much to carry for the company itself.

If it was only that I met Mona, my lifetime love, current fiancee and soon my wife (God Willing), and, the girl I believe is the best to exist in our world today, I met in occasions all related to SilverKey, that would be enough.

So, technically I'm not leaving SilverKey completely for the upcoming while. Afterwards, who knows,, most likely the new generation will take over on its own afterwards (God willing).

 

DISCLAIMER

The thoughts and states expressed in this post and entire blog are solely mine. Neither of my past/current/future employers nor any of their employees/owners hold any kind of responsibility for or commitment to any of them, even if mentioned in behalf of this employer.


Cross posted from weblogs.asp.net/meligy


posted @ Wednesday, September 17, 2008 6:33 AM | Feedback (0) |

Thursday, September 11, 2008

[Link List] White Paper: Evolving a .NET 2.0 Application to .NET 3.5

Although I hate to quote that often, but, this one is totally worth it:

Brad Abrams recently wrote a reference to this great "Evolving a .NET 3.5 Application" white paper, about the common scenario of migrating a .NEt 2.0 project to .NET 3.5.

The white paper is available in PDF format here (direct link).

About which I quote Brad's words:

I reader recently forwarded me an interesting case study that covers a very common scenario: Porting a .NET Framework 2.0 based application to .NET Framework 3.5. 

The paper does a nice job of providing resources to get started with, how to learn what is new in .NET 3.5, etc.  As well as details on why this project made decisions it did around using WPF, WCF, etc. 

I don't claim to agree with all the assertions made here, but all in all it is a very balanced, pragmatic view of what some of the common choices you will have.

The project uses client and server components and the paper talks about not only the design process but how to build AND test these.  They talk about ViewModel in WPF, IoC, NUnit and VSTS, etc

Enjoy!

 

Yeah, Enjoy :).


Cross posted from weblogs.asp.net/meligy


posted @ Thursday, September 11, 2008 4:20 PM | Feedback (0) |

Wednesday, September 03, 2008

Quick note-to-self about Google Chrome Source Code

It is a VISUAL STUDIO 2005 PROJECT! Of course we're talking about the Windows version here :).

See short note...