From the free and proven IoC containers/frameworks, please let me know which ones you prefer to use and what makes you choose that one instead of the others?
- Castle Windsor – Castle Project (http://docs.castleproject.org/Windsor.MainPage.ashx)
- Ninject (http://www.ninject.org/)
- StructureMap (http://docs.structuremap.net/)
Thanks in advance for your inputs.
Here are few nice articles about Service Bus on Azure
- How does it work: http://www.codeproject.com/Articles/276400/Using-Windows-Azure-Service-Bus-Messaging
- Another how does it work with topics and subscriptions: http://robbincremers.me/2012/02/20/windows-azure-service-bus-messaging-with-publishsubscribe-pattern-using-topics-and-subscriptions/
- Great tool, Service bu Explorer: http://code.msdn.microsoft.com/windowsazure/Service-Bus-Explorer-f2abca5a
Azure is so powerful and it is increasing its power with new use cases.
I am totally amazed and I see that the game will change completely in 10 years where cloud will be a MUST!
Given that, let’s take a look into some challenges in Azure specifically.
Azure has a nice & simple management portal and it allows to add co-admins which is extremely nice however at the same time it is damn too powerful.
Once you have access, you simply can do anything and so far there is no role based management.
Your team may want to see what is going on Azure and you simply can’t give this access to anyone.
At this exact moment, Management API comes to our help which has all the powers as the management portal but you can simply make a simple website which just gives existing setup to your employees as a read only portal.
Details of the API can be found here: http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspx
And one of the most important thing to implement Management API is, the Management Certificate (well, you need some sort of security to give access to the system and can’t really have the password shared anywhere)
Certificates in Azure is an important subject where this article in TechNet explains all details about that: http://technet.microsoft.com/en-us/magazine/gg607453.aspx
Note: Soon Azure Readonly Portal will be live
Finally SevDer ORM+ had a long way so far and almost ready.
I would like to share the first preliminary screens.
Tool will be completed by tonight/tomorrow I hope.
Here you just need to select the profile or just start building one.
Very simple profile setup..
Here you go with code generation, ORM kicks the way you need!
As you see even it generates ASCX files (I will in the future add ASPX option and MVC/RAZOR too, but not yet)
After getting frustrated with the fact that Entity Framework and NHibernate does not resolve my needs, I am writing my own ORM tool to finalize one very important part of enterprise architecture.
Here are the features that are included (hope to finish by tomorrow)
- Mutliple entity classes (one per each)
- Single Data Provider Class
- One Interface IDataProvider
- One Class which inherits I[Model]DataProvider (SQL[Model]DataProvider)
- [Model] to be renamed by the model name provided
- One mocked class using moq framework (http://code.google.com/p/moq/)
- SQL[Model]DataProvider will also implement retry logic in case of certain cases such as
- Connection Timeout etc.
- In a nutshell the following error codes : -1,-2,2,53,1222,1205
- Will obviously generate related stored procedures and utilize them
- Entities will be able to track simultaneous changes and will be able to throw exception if data changed before update!
- Entities will implement [DataContract] & [DataMember] so that usage in WCF will be a lot easy
- As you may see from here generated codes will implement Abstract Factory (Provider) design pattern and possibility of Singleton is also there.
So far, the best tool I’ve seen is Selenium (with Firefox recorder of course) for functional testing.
It covers most things that one may want to achieve.
Here are the points where Selenium (http://seleniumhq.org/) shall be used
- Functional testing of web pages (not only web of course)
- Validation content on the page
- Source code (rendered of course)
- And above things by specifying where you expect it
- You don’t need to code for that, you just specify those using the recorder tool (it does it for you)
- Run complete tests as unit test
- by default it is Nunit but it is not a big deal to convert into MSTest format
- Just imaging adding function UI test code coverage results into all other unit test coverage results
- Regression testing
- All test scenarios combined
- All browsers and versions for all scenarios
- Simply stop doing manual test please, it is very easy to do with this tool (not limited to .NET etc.)
- Performance testing
- Please note, selenium is browser based tool so it will open up a browser
- Before you reach to the target servers limits you will reach executing machines limits because of having so many browser windows opened by selenium test
- I would say don’t go for this because
- Most of those can be from other vendors than your own
- It is extremely difficult to manage that (long story to explain)
- What would you get in the end?
- You can try this but only if you’ve mastered your actual code with more than 90% coverage
After doing enough research on both, what we’ve end up doing is; not using any ORM tool.
ORMs are designed to do rapid development for RIA (Rich Internet Applications) where performance is not a big concern.
Yes, ORM can speed up your development such as EF 4.0 or NH but they all lack one very important thing which is support for Stored Procedures for general select which shall be by default. All ORMs are focused on eliminating that and trying to optimize queries without SP.
If you ask me, SP are most useful when you use for select in general because you can really optimize the execution plan and it will be cached on SQL server. So in all subsequent calls to the database with same routine, SQL server will always know the execution plan and it will save time. [SP's execution plans are cached on SQL server.]
Therefore not using ORM is my choice.
Here are what I lose by not using ORM
- Extra quick development
- Default behavior of throwing exception on an update where data was already changed before the update (concurrency handling)
- Will get the best performance
- My code will not have unnecessary extra code which I may not even use
- Will use SP’s the way they are supposed to be used
- Will abstract data layer in the most perfect manner
- Improve existing code generator to do my own ORM (no oData)
- All entities will be generated with DataContracts, DataMembers (necessary in WCF)
- Proper implementation of RETRY logic in SQL Exceptions (if you ever want to move into SQL Azure, you need to do this also)
- Will implement concurrency handling
We are comparing to select the next robust data layer and almost in the end
Here are the requirements
- Needs to be available as a service
- Very important to segment out security to limited resources [PCI]
- Very helpful when testing [helps in mocking also]
- Needs to be easy to adopt
- If possible build in minutes
- Needs to be flexible in migrations/versions
- Needs to work with existing stored procedures
- Shall force developers write better code
- Most mature and longest in market
- Easy caching
- Versions are not big issue, backwards compatible
- Lazy loader per entity
- You need to still write a lot of code
- No designer/GUI
- Service is not provided out of the box
- Longer learning curve
- Easy to build with GUI support [in minutes]
- Easy to convert to service in minutes also
- Easy Lazy loader for the whole model
- Migrations/versions are manageable and will support earlier version clients with few tricks
- Works with existing procedures
- Links entities without any effort
- Code First, Model First, Database First Support
- Data Changed notification [Don't know if NHibernate has this]
- Not yet mature enough
- Caching is not provided out of the box
- Select procedures are not that easy like Delete, Update & Insert
- Default behavior may make developers yield to, not to use stored procs hence poorer performance may occur & worst of all deadlocks can occur [not so different in NHibernate also]