Really awesome and really simplified now….
Ohh before I forgot, this is a nice tweet by .NET Team for James.

.net, best practices, C#, free tool, Json, quality, Simplicity
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?
Thanks in advance for your inputs.
.net, Architecture, best practices, C#, Code Improvement, Dependency Injection, Development, free tool, IoC, quality
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
Azure, best practices, Cloud, Security
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..

Code Generation based on selected Profile (ORM)
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)
.net, Architecture, best practices, C#, Code Improvement, Development, SevDer ORM Plus, SevDer ORM+, Simplicity
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
- Deadlock
- 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.
I think all of those will give me the best ORM that I would need.
I’ve named it as SevDer ORM+ and first version will be completed by tomorrow
.net, Architecture, best practices, C#, Design, design pattern, Development, Entity Framework, free tool, quality, Simplicity, unit testing, WCF
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
- Image
- Text
- Source code (rendered of course)
- css
- Note
- 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.)
Here are the points where Selenium shall not be used for
- 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
- Javascript coverage
- I would say don’t go for this because
- You probably use many javascript files anyway
- 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
- Your functional testing actually covers your javascript anyway and as jscript is not compiled code, plus it can be fed by CMS or it can be hosted outside of your servers, it will not make too much sense to do it. You will never get a good figure.
I hope this also helps a lot.
Let me know if any changes are required
asp.net, best practices, code coverage, Development, free tool, QA Automation, quality, Simplicity, unit testing
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
- oData
- Extra quick development
- Default behavior of throwing exception on an update where data was already changed before the update (concurrency handling)
What I gain by not using ORM
- 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
As a result, I have tons of gains by not using .
Most important is achieving best performance and SP usage on selects.
I hope I’ve helped.
Please let me know if any more digging in this is required.
.net, Architecture, Azure, best practices, C#, Cloud, Development, EDM, Entity Framework, ORM, Simplicity, WCF, WCF Data Service
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
Given those here are the comparisons and the choice
NHibernate the good
- Most mature and longest in market
- Easy caching
- Versions are not big issue, backwards compatible
- Lazy loader per entity
NHibernate the not good
- You need to still write a lot of code
- No designer/GUI
- Service is not provided out of the box
- Longer learning curve
Entity Framework the good
- 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]
Entity Framework the not good
- 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]
So at this moment EF 4.0 + WCF DataServices is my choice to move forward, starting tomorrow.
Ohh friends, please correct me in the areas where I am not correct.
.net, Architecture, best practices, Development, EDM, Entity Framework, NHibernate, WCF Data Service