Share/Save
Blog


It is a proud moment for us. InfoBeans is now certified as  CMMI Level 3 company by the SEI, Carnegie Mellon University, USA.

We have always had our focus on delivering quality software solutions to our clients and this just reinforces our vision to the outside world. We are a proud and happy team today.

For more information on how this was achieved go here.

I would like to thank everyone in my team. I work everyday with an awesome set of people who make things happen and Create WOW! everyday for all of our stakeholders. 

We do not rest here. We continue with our journey and our mission to Create WOW! 

May 17, 2012

Tagged with: Blog



Recently in one of my project, I used T4 Template for quick code generation and it turns out to be a really helpful tool for accomplishing repetitive coding tasks, this inspires me to write this blog.

Challenge

Many times in various parts of code development cycle we require similar piece of code with a little variance. It may be UI related code or business logic classes (Manager Classes) or Entity classes or could be stored procedures. I always felt that, this kind of code can be auto generated with the help of some tools instead manual efforts.

In my project I wanted to auto generate all the “Admin Web Site” pages which includes seed data editing  as these may  have similar kind of UI & functionality, like showing all the records into an Ajax grid and allowing them to edit on popup window etc.

Candidate Solutions

There are number of third party tools available in the market today which are capable of generating reusable code.  The only limitation I see is they have their predefined architecture and code generation strategies.  Fitting auto generated code from different architecture to current application architecture is always a frustrating task at least for me.

Then another option I thought of is Code Dom, which comes along with .net framework itself especially for code generation purposes.  When I explored this option in much detail, I realized that it requires huge learning curve which mainly includes writing code into “Intermediate Language” (IL).  Of course it has many pros, like it can generate code for multiple languages from a single source template, but this is not what I want. I want very simple and easy to implement solution for generating similar kind of reusable code.

Now here comes Entity Framework code generation approach which uses T4 templates to generate all the source code files.  When I dig more into it I found that it is pretty easier to implement this instead of “Code Dome” because it uses simple C# syntaxes for template writing.  I was sure that T4 approach will serve the purpose so I decided to opt for it.

A brief Introduction about T4 Template

In Visual Studio, a T4 text template is a mixture of text blocks and control logic that can generate a text file. The control logic is written as fragments of program code in Visual C# or Visual Basic. The generated file can be text of any kind, such as a Web page, or a resource file, or program source code in any language. You can find more detail in following link:

http://msdn.microsoft.com/en-us/library/bb126445.aspx.

My Approach

First I wrote one complete functional web page which I wanted to replicate for rest of web pages. Then I created two separate T4 templates, one for “ASPX designer file” and other for “Code behind file”.  After this I copied previously developed Webpage into respective templates. Then I replaced hard coded entity names and column names with dynamic column names by using reflection. I also add logic to generate UI and data operations based on columns data types.

We are pretty much done here, now the only thing left which is to change entity name in the template and complete code will be automatically generated in minutes. Every time you need to generate code for different entities just replace the entity name in the template file.

Below is the snap of my ASPX file generation T4 template.


Below is the snap of my code behind file generation T4 template.

Written by:  Dharmendra Baghel

March 1, 2012

Tagged with: Blog, Custom Development



Challenge

Recently I started working on a new project, with a few other team members. This project involves a really good amount of ERD, means there are a bunch of entities involved in the Database, with a lot of relationships in-between.

I am personally very fond of working with ORMs and familiar with Entity Framework 4.1 and nHibernate which was an obvious choice here but other people involved in this project suggested not to use this as they had some bad experiences with “Entity Framework”.

I guess you might have come across same situation like this. So I thought to write down my own ORM using T4, Which was absolutely not the right choice as per the tight deadlines.

So I thought of another solution which involves writing a base manager class which will serve the same purpose.

Features

  • Supports stored procedures
  • Enables use of “BaseEntity” class which is missing in Entity Framework Database first Approach
  • Ability to work with business entities without manually filling business objects from data tables
  • Single function is able to fill all the Complex/Navigation properties of a particular entity, up to N Level whether it is “One to One”, “One to Many” or “Many to Many” relationship. And same behavior is required in the case of saving the data
  • Ability to perform basic data operations without writing repetitive code
  • Ability to use eager loading as well as lazy loading

Solution

  • Create all the tables in database along with their relationship. Make sure every table has a column “ID” in it as a primary Key
  • Create Stored Procs for all the data manipulation tasks. Make sure that the entire stored procs name will have a special naming format “prefix + Table” Name like “Get+Table Name” and “Save+Table Name”
  • Create a simple DAL, using plain ADO.NET, that has the ability to execute stored procedures, and return DataTable objects
  • Create a base entity class for common properties in all the tables
  • Create a class for every entity of database. Make sure that all its properties of entity matches with all the columns of a certain Stored Procs result set. Also all the entity must inherit from the base entity class
  • Include “Base Manager” class which has basic data interaction methods.  You need to inherit all manager classes from this base manager class. Now you can work with all the business data as objects and not Datatables

Here is a snap of my base manager class.


Here is how fast and easy to create your manager class. No method required for basic database operations.

If you have complex Entity which has a complex or Navigation properties with different kind of relationship in between, You can specify relationship by “ChildEntityInfo” object. In this case Manager class would look like below code.

 


Now you can use manager class as a normal manager class. Like below

Conclusion

This obviously isn't the best solution to this case, and obviously isn't something ground-breaking either. I just tried a simple solution that helps a lot when it comes to trying to deal with such circumstances. Hope this will be helpful for others as well.

Written by:  Dharmendra Baghel

February 23, 2012

Tagged with: Blog, Custom Development



The most awaited event of the year at InfoBeans is mega outing in which entire InfoBeans team along with their families come together for 4 days holiday. This is when all offices across geographies are not operational.

This year also InfoBeans Pune team along with their families went for Mega Outing to land of beaches Goa often called as "Pearl of the Orient" and a "Tourist Paradise".InfoBeans Pune team had a scintillating time there and enjoyed the holidays at the fullest.

Check out some photos of our Mega Outing 2011.

Written by:  Manish Malpani

January 3, 2012

Tagged with: Blog, What’s happening



At InfoBeans, CSR is considered as not a responsibility but an ideology that got imbedded in the culture of InfoBeans. The founders are strong believers of the concept and motivate the entire team to participate in various initiatives at organization and society level.

InfoBeans team participated in AMITY CSR Conclave 2011 and it gives me great pleasure to announce that we have won the award for CSR Excellence (Small  Scale category).

Kudos to the entire IB Care team and all of us for making conscious effort to give back to society.

 

Written by:  Kanupriya Manchanda

December 12, 2011

Tagged with: Blog, What’s happening



The most awaited event of the year at InfoBeans is mega outing in which entire InfoBeans team along with their families come together for 4 days holiday. This is when all offices across geographies are not operational.

This year also InfoBeans team along with their families went for Mega Outing to Ranthambore National Park in Rajasthan. Check out some photos of our Mega Outing 2011.

Written by:  Manish Malpani

December 12, 2011

Tagged with: Blog, What’s happening



Quality is simply an obsession. An obsession to deliver nothing but the best. Obsessively and compulsively engaged in delivering what is required without deviating even a small pixel.

Only with this spirit will one see great results, great products, great success. 

Written by:  Siddharth Sethi

November 29, 2011

Tagged with: Custom Development



If you see software development as a cost center, you need to rethink that entire department. If it is technically a cost center, then you are not in the business of software. That is when you need to seriously think about outsourcing it to someone who thinks of it as a profit center. Those are the folks who would treat their team well. And that would result in great solutions and great software for your company.

Written by:  Siddharth Sethi

November 21, 2011

Tagged with: Custom Development



Writing software is hard. It is not trivial and there will be no magic formula anytime soon that would create great software with just a click of a button.

One needs to realize that when writing software, bugs are always a part of the package. There just cannot be a chunk of software that is written that would be totally bug free. I am not saying that one should ship with bugs. NO!

What is important is the management of these bugs.

If developers and indeed the quality folks can find, manage and then fix those bugs, the end result will be great software exceeding expectations of everyone involved.

Managing the bugs involves first acknowledging that there will be bugs. Most developers refuse to believe that their software can ever have bugs. Let that go. Every piece of code ever written has bugs. Accept it.

Then there needs to be concerted effort to find those bugs. First at the developer level, what some would say unit testing. But going beyond that, what stops the developer from running full blown test cases that apply to her code? Run them, and the unit tests and whatever other tests you can run. Don't leave that to the QA guys. After all you are proud of your code, you do not want them to think your code is a piece of junk. Give them your best and save yourself the blushes later on.

Then of course you fix those bugs. That is obvious.

But what is not obvious is that you have to test all over again. Assuming that you have fixed everything and it will run fine after you have fixed a bug is hazardous. You are just undoing all the hard work that you have put in.

Once you ship to QA, don't disown the code. Be in touch with them and find out what is going on with the testing, in particular your own stuff, but also with the entire software that your code is integrating into. You can catch things they will not catch.

Ask the testing folks to break your code. Then take pride in the fact that they were not able to.

Another aspect of bug management is tracking your bugs. Make sure you understand the bugs that are assigned to you, you fix them, understand the fix and then track them right back to the QA guys so that you know what is going on with your bug.

Last, but not the least important is something that is really always overlooked. Expectation management. Managing expectations of the quality team, and the user. If you can tell them before hand that there is a certain issue with the software, there is a lot of time, energy and heartbreak that you can save.

Telling the QA folks that there is a certain or to expect a non conforming behavior is a sure shot way of making friends out of your sworn enemies. They will be eternally grateful to you for not wasting their time.

Telling your customers up front about the issues will delight them. Not antagonize them. Be brave, honest and up front.

Know that you cannot kill all your bugs. Manage them well and you can sleep well.

 

Written by:  Siddharth Sethi

November 21, 2011

Tagged with: Custom Development



Siri is purported to change everything. Even challenge Google. And I believe so myself.

Question is, why just on mobile? Can Siri not change everything everywhere - desktops, laptops, even servers? 

Word processors, might become obsolete in their current forms very soon. Soon, many people might need a keyboard. Mice are dead already.

Application developers need to keep a close eye on this. This can be a truly disruptive technology.

Written by:  Siddharth Sethi

November 10, 2011

Tagged with: iPhone




InfoBeans Home InfoBeans
Triangle
IB@Twitter

Call
888 4INFOBEANS
to schedule a presentation
Request a
capabilities
presentation