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.
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
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.)
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
- 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
I hope this also helps a lot.
Let me know if any changes are required
Here we go,
After so much name discussion, finally project name is clear.
- It needs to be on the cloud (Azure)
- It needs to be clean (Green)
- It needs to be unique
So what makes the gloudcms?
- Runs on cloud
- Currently only designed for windows Azure
- Be Green
- Implement all best practices
- All code analysis rules are passing (implemented ) √
- 100% code coverage (not yet implemented)
- Clean implementation √
- Easy to integrate / install √
- Only requirement to install is
- Put the dll file into your bin directory
- Make 1 line change in web.config
- Copy “Template” folder which contains CMS templates you want to implement (make your own also)
- No additional hardware requirement √
- Platform independent (other that being on .net platform) √
- Can run on azure
- Can run without azure
- Currently supports only
- Looking for translators for other languages send me email from email@example.com
Do you want to test drive what is there so far?
Ok, I am not offering all fancy things you can test yet, just a simple admin view is there without saving.
Please note, the importance of this preview is about having simple installation on base asp.net application and being on cloud and implementing all static code analysis rules.
From now on, all features will be coming in and making this very interesting.Simple change in web.config for Azure:
<modules runAllManagedModulesForAllRequests="true" >
<add name="gloudcms.net" type="SGCmsBase.SGIntercept" />
Change in regular web.config (No Azure)
<add name="gloudcms.net" type="SGCmsBase.SGIntercept" />
I am sure, many of you had frustrating experience from time to time.
How bad it is to be in situation where a developer causes the whole release to be delayed unnecessarily!
Or one mistake by a developer causes all developers/development teams to suffer?
Or even worse, how a developer cause a huge live bug!
None of those are fun to have and indeed very much frustrating.
What shall we do?
Someone shall take the responsibility because I hate to hear sorry after sorry!
We shall penalize the developer also?
Even better, the TEAM that developer belongs to be penalized so they will be more careful next time!
But what is the solution? How do we penalize a tech team?
Of course not with money!
And firing is also not a problem.
I have a solution which works perfectly!
I simply force the whole team to do one of the following in order for them to be allowed to be checking in.
- Fix some code analysis rules (I change the warnings to “errors”). Build fails if we have erroneous rule failures (VS 2010 code analysis or fxcop 10.0)
- Enforce to write more unit tests to increase code coverage rate.
And how actually I guarantee that it is done properly.
Thanks to TFS 2010 Gated Check-ins.
- Each check in is controlled by gated check-ins
- Check-in fails if
- Solution does not build
- There are errors in code analysis rules
- A Unit Test Fails
- Code coverage rate is below last coverage value (we’ve customized build template in order to achieve this)
- If they need to be penalized I enforce them to cover 1% more code with unit tests
- Here is an example result:
That is our solution and results are improved code quality.
I thank Microsoft for TFS 2010 and automated builds.
And thanks to Serdar for implementing build template modification.
It will be a bit odd but I thank myself for the innovation here and getting deep into the capabilities which can be controlled.
I’ve been interviewing several candidates throughout the week and here is the frustrating observation.
- Don’t know unit testing
- The ones who know don’t know code coverage
- Many hear the phrase from me only
- Some use it for site monitoring rather than code health check
- The architect level experienced ones can’t do simple web project
- Not asking too much, just have form, validate data, save into database and show on another page (list of data from database)
And we are not offering low salary for this. Still I am surprised that many fail on those.
Still waiting for the perfect talent to come soon.