Sometimes it’s difficult

I am a good contributor(+moderator) at  forums ( and I love MVC ). Sometimes it’s very difficult to stay calm . Let’s make an example:


[new programmer first post]

Hi I am new in ASP.NET mvc 3

I want to insert/modify collection on the page without refresh.

[ code for database first]

Now on create product View I want to add a composite in IList<Composite> Composites collection.



[My answer]

2 things here:
Modify a collection in MVC :

Send via ajax :


[new programmer answer after 4 ( FOUR!) minutes]

Hi ignatandrei

Thanks for the reply.

But I have no idea how to implement this thing.

can you give me a small example regarding this.

I have tried many times but not successed.


[My answer]

quoting “I have no idea how to implement this thing” from new programmer

What thing of the 2 I have shown you ?
More, I admire your fast reading if you read 2 tutorials(max 6  minutes)  so fast , download codes , reproduce and decide that you do not understand.


[new programmer]

Hello ignatandrei

I am sorry… The links which you have posted was not underlined/highlighted; so that’s why I thought  it were like suggentions. because of that misunderstanding I replied you back for demo application.



And then the usual combination of “ I am getting an error” – although my tutorial it handles errors – both from server side and communication side

However, when someone asks for help it is good to READ what other said – even it was suggestions…

And , as I say, sometimes it is difficult to stay calm. What have you answered?

friday links 25

  1. project.jpg (JPEG Image, 800 × 600 pixels)
  2. Mozilla Personas Gets a new Name (and it’s not BrowserID) – InternetNews.
  3. Windows Azure Task Scheduler | Shannon Whitley
  4. AlwaysOn Availability Groups (SQL Server)
  5. Debugging Tools for the .NET Developer — Visual Studio Magazine
  6. Hierarchies (trees) in SQL Server 2005 – Anthony Bloesch’s Web Log – Site Home – MSDN Blogs
  7. WebAIM: Blog – History of the browser user-agent string
  8. Steve Clements
  9. Budism – Wikipedia
  10. The Pwn Plug is a little white box that can hack your network
  11. Peeling Back the Onion Architecture | Tony Sneed’s Blog
  12. Screening C# Candidates: Let’s Play 20 Questions! | Tony Sneed’s Blog
  13. patterns & practices – Windows Azure Guidance
  14. Do you monitor negative events? – Ayende @ Rahien
  15. Limit your abstractions: All cookies looks the same to the cookie cutter – Ayende @ Rahien
  16. Limit your abstractions: You only get six to a dozen in the entire app – Ayende @ Rahien
  17. Download: Extensible Application Markup Language (XAML) – Microsoft Download Center – Download Details
  18. – ASP.NET WebAPI Security 2: Identity Architecture
  19. ASP.NET Web API: web hosting « Pedro Félix’s shared memory
  20. ASP.NET Web API Processing Architecture « Pedro Félix’s shared memory
  21. Richardson Maturity Model
  22. Optimizing apps for cloud | Vector | Channel 9
  23. 10 Facts About Working at a Startup vs. a Big Company | Surf Roots, Software Thoughts
  24. MvcScaffolding: Creating custom scaffolders – Steve Sanderson’s blog – As seen on YouTube™
  25. Creating Zip archives in .NET (without an external library like SharpZipLib) – Jon Galloway
  26. The top 9+7 things every programmer or architect should know – Java Code Geeks
  27. Zen in the art of IT: Top 7 of 97 Things Every Software Architect Should Know
  28. jQuery Mobile Tutorial: Creating a Restaurant Picker Web App
  29. Android push notification implementation using ASP.NET and C# – CodeProject®
  30. Home Automation with Netduino and Kinect – CodeProject®
  31. Great Developers – SQLServerCentral
  32. Great People Are Overrated (Part II) – Bill Taylor – Harvard Business Review
  33. 5 Reasons You Need to Meet in Person |
  34. Scripting ASP.NET MVC Views Stored In The Database
  35. 10 favorite freeware tools for IT pros | TechRepublic
  36. Troy Hunt: Browsing the broken web: a software developer behind the Great Firewall of China
  37. Internet Explorer 6 Countdown | Death to IE 6 | IE6 Countdown
  38. Journey of a Software Developer | Detecting Session Timeouts using a ASP.Net MVC Action Filter
  39. Journey of a Software Developer | UrlMappings — An ASP.NET feature I forgot about
  40. Journey of a Software Developer | A little fun with T4 Templates
  41. Responsive web design in 3 minutes 42 seconds – thebeebs – Site Home – MSDN Blogs
  42. Open plan offices must die! – Rogish Reading Writing
  43. The Starter, the Architect, the Debugger and the Finisher |
  44. What’s New In The .NET Internationalization Source Code
  45. Domain-driven design – Wikipedia, the free encyclopedia
  46. GRASP (object-oriented design) – Wikipedia, the free encyclopedia
  47. A Generic ASP.NET MVC Template
  48. Alex Davies : Why lock-free data structures just aren’t lock-free enough
  49. Tony Davis : Concurrent Affairs
  50. MIX Online: Adventures With Windows Azure Diagnostics
  51. Introducing Windows Azure Diagnostics – Windows Azure – Site Home – MSDN Blogs
  52. Initializing the Windows Azure Diagnostic Monitor and Configuring Data Sources
  53. Windows Azure Hosted Web Core Worker Role – Home
  54. Populate Excel Template : The Official Microsoft ASP.NET Forums
  55. Improving Launch Performance for Your Desktop Applications – .NET Blog – Site Home – MSDN Blogs
  56. WURFL: An Essential Mobile Website Technology – Page 3
  57. Stop solving problems you don’t yet have | this is
  58. Design Staff – Story-centered design: hacking your brain to think like a user
  59. Sam’s ultimate web performance tool and resource list
  60. Creative Studio exclusively for Nokia – Nokia Conversations : the official Nokia blog
  61. Writing Android Programs with HTML and JavaScript – CodeProject®
  62. ADO.NET Interview Questions: Part 1 – CodeProject®
  63. The Daily Status Meeting | SQLAndy
  64. Jef Claes: How a web application can download and store over 2GB without you even knowing it
  65. Functional Fizz Buzz
  66. I’m a Junior Developer – You probably are too – Diary Of A Ninja
  67. 8 Must-Have Tools for Windows Phone 7 Development – Diary Of A Ninja
  68. ASP.Net HttpModule to detect and redirect mobile devices version 2.0 – Diary Of A Ninja
  69. Localization in ASP.NET MVC with Griffin.MvcContrib – CodeProject®
  70. Find Customers Who Bought A and B But Not C (SQL Spackle) – SQLServerCentral
  71. TekPub – High-quality screencasts for programmers.
  72. Securing your ASP.NET MVC 4 App and the new AllowAnonymous Attribute – Ricka on MVC and related Web Technologies – Site Home – MSDN Blogs
  73. 5 things to learn about ASP.NET MVC 4
  74. Simple GTD Startup | RestartGTD
  75. Outlook Blog – Developing a provider for the Outlook Social Connector version 1.1
  76. Quick Steps for Learning to Develop a Provider
  77. Building the Sample Provider
  78. Outlook Sample: Outlook Social Connector Provider – Home
  79. Welcome to the Outlook Social Connector 1.1 Provider Reference
  80. PCL & Azure How-To: Using Portable Class Libraries and AppFabric Service Bus To Create a Continuous Client — Visual Studio Magazine
  81. Event Sourcing
  82. Free Databases in the Window Azure Marketplace — Visual Studio Magazine
  83. Publishing | Windows Azure Marketplace
  84. Forget Improvements — Systems Management Needs a New Approach — Enterprise Systems
  85. Seth’s Blog: Email checklist
  86. Blogs > “Done”. “Done Done”. When is a feature really done?
  87. Top 10 Best Practice Links for using C# with Windows 8 – Secret Microsoft Communications – Site Home – MSDN Blogs
  88. Rethink your Startup Website: Make a Net, not a Funnel
  89. Ben Alman » jQuery doTimeout: Like setTimeout, but better
  90. The 6 Performance Tuning Mistakes You Don’t Want to Make | SQLRockstar | Thomas LaRock
  91. The CodeExpressionBuilder – Infinities Loop
  92. Looking for a .NET Developer in Bucharest for one of the players in the IT field. Know anyone? | LinkedIn
  93. Looking for two skilled .NET developers | LinkedIn
  94. Dream Team Software Cauta Programator | LinkedIn
  95. ComponentSource Software Publisher & ISV Program Overview
  96. Download: CLR Profiler 4 – Microsoft Download Center – Download Details
  97. I don’t hire unlucky people – raganwald’s posterous
  98. The Lean Publishing Manifesto – Leanpub
  99. Adobe WebUp #4 – Eventbrite
  100. Logging UI for Vista v1.1 Released : Tobin Titus Blog : The Official Microsoft IIS Site
  101. Logging UI for IIS 7.0 on Windows Vista : Community : The Official Microsoft IIS Site
  102. Index of /documents/books/csadv
  103. SET CONTEXT_INFO (Transact-SQL)
  104. Storing ASP.NET MVC Controllers & Views in separate assemblies
  105. How to: Read From Fixed-width Text Files in Visual Basic
  106. Selling Data in the Windows Azure Marketplace — Visual Studio Magazine
  107. 18 Most Popular jQuery Plugins of March 2012
  108. Make .NET performance problems a thing of the past
  109. PHP: a fractal of bad design – fuzzy notepad
  110. danielcrenna/i18n
  111. Make Async Your Buddy With Reactive Extensions
  112. Using Reactive Extensions for Streaming Data from Database – About My Code
  113. Building Expression Evaluator with Expression Trees in C# – Part 3 – About My Code
  114. The Programming Languages Beacon

Sample Kinect application

Made my first application for Kinect. It was just a combination of multiple other source code + EF4.3 for SqlServer Compact 4.0 ( to can have a database without pain of installing).

As learning:

  1. The audio recognition does not work very well.
  2. It was fun to write
  3. Do not make an action for each joint movement – it is overwhelming for Kinect
  4. If you approach Kinect device perpendicular ( such as line of shoulders is perpendicular  to Kinect) it does not recognize you.


The application makes a simple thing:

You can use them to photo the thiefs that comes after you left the house.
Just press “Capture” (or make a circle with the right hand) and after a timeout( set in option) the application will register, via Kinect, any new human move.It will save to the
<user profile> AppData\Roaming\Pictures  and, if configured , to a website ( more details later this month).


Download from here if you have a Kinect device

IValidatableObject and IDataErrorInfo

At the beginning it was IDataErrorInfo. Next , it came IValidatableObject. And , because some GUI frameworks implement one and not other, I must think to a common way to validate once .

My choice was to validate with IValidatableObject and IDataErrorInfo just re-send data.

I made an example with a class User which has UserName, UserEmail and UserPassword.

Without much ado, this is the code:

 public class User : IValidatableObject, IDataErrorInfo
        public string UserEmail { get; set; }
        public string UserName { get; set; }
        public string UserPassword { get; set; }

        public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
            if (string.IsNullOrEmpty(UserEmail))
                yield return new ValidationResult("UserName", new string[1] { "UserName" });

            if (string.IsNullOrEmpty(UserEmail))
                yield return new ValidationResult("UserEmail", new string[1] { "UserEmail" });

            if (string.IsNullOrEmpty(UserEmail))
                yield return new ValidationResult("UserPassword", new string[1] { "UserPassword" });


        //IDataErrorInfo - you can copy this code to each class
        public string Error
            get { return this[""]; }

        public string this[string columnName]
                string ret = null;
                var data = this.Validate(new ValidationContext(this, null, null));
                switch (columnName)
                    case "":

                        foreach (var item in data)
                            ret += item.ErrorMessage + Environment.NewLine;
                        foreach (var item in data)
                            if (item.MemberNames.Contains(columnName))
                                ret += item.ErrorMessage + Environment.NewLine;
                return ret;

And you can verify like this:

User u = new User();
            Console.WriteLine("-----from  IDataErrorInfo");
            string err = (u as IDataErrorInfo)[""];
            Console.WriteLine("-----from  IvalidatableObject");
            foreach(var item in (u as IValidatableObject).Validate(new ValidationContext(u, null, null)))

            Console.WriteLine("-----from  Validator");
                Validator.ValidateObject(u, new ValidationContext(u, null, null), true);
            catch (ValidationException EX)

                Console.WriteLine("JUST " + EX.Message);

You can find the code also there

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.