Milos Solution Platform (External Blog)

The Milos Solution Platform is .NET's premier platform for building business applications. This blog is meant for developers who use or evaluate Milos. This blog is used to share tidbits of information provided by the Milos developers at EPS. Many of the posts put the spotlight on new features. We generally recommend that all Milos users (developers) at least scan this blog to keep up with the Milos news.

Content Area Footer

Friday, April 04, 2008
Lessons learned - Little new ones, big old ones

We’ve got an in-house application that we’re working on as a training exercise.  Like most projects of this type we find ourselves relearning old lessons.

We wanted to extend the functionality of the standard windows DateTimePicker control by creating a new composite control with a DateTimePicker and adding spinners for hours/minutes.  We started out with the DateTimePicker and two spinners (pretty obvious first step) and gave the class a DateTime property to hold the core DateTime value.  We then data bound the DateTimePicker and the two spinners to the DateTime property.  The DateTimePicker was bound to the DateTime property and the spinners were hooked up to the hour or minute components of class’ DateTime property.

We wired everything up and tried running the shell application.  Every time we touched the composite control we got exceptions revolving around one of the constituent controls (dtPicker or spinner) having a null value.  Mike Yeager wandered in and made the fateful observation that we had “grossly over engineered” the composite control by having each constituent control separately data bound to the same property.  After all, the entire DateTime value was stored within the dateTimePicker control.

We removed the databinding of the two spinners to the DateTime property and created properties for hours and minutes that were based on the existing hour/minute components of the dateTimePicker.  The getter of the hours/minutes properties returned the hour or minute component of the DateTime value in the dateTimePicker.  The setter of the properties called a method that concatenated the year/month/day components of the dateTimePicker with the values of the hour and minute spinners into a new DateTime value.  The spinners were hooked up to the hour and minute properties.

It took about 15 minutes to scrap the old code, reassemble the controls and properties, and then bind everything together.  It worked on the first try!

  • The “new” lesson learned was specific and almost trivial: When extending the functionality of a multi-faceted control, use that control’s internal value as the basis for your work rather than reinvent the (DateTime value) wheel by pushing three separate controls at one value.
  • The “old” lesson is: “Think about what you’re going to do before you even touch the keyboard.  You should have a clear vision of your objective before writing the first line of code."

    Claudio will be amplifying on this in his blog, complete with code samples.

Posted @ 4:13 PM by Chichester, Thom ( -
Comments (16)


RE: Lessons learned - Little new ones, big old ones
Wednesday, June 29, 2011 7:27 PM by vibram 5 fingers -

Great job on the blog, it looks great. I am going to save it and will make sure to visit weekly

RE: Lessons learned - Little new ones, big old ones
Tuesday, November 08, 2011 6:51 PM by iPhone 4S Ringtone Maker -

iPhone 4S Ringtone Maker is the fastest and easiest way to create custom ringtones for your iPhone.

RE: Lessons learned - Little new ones, big old ones
Monday, March 27, 2017 2:13 AM by do my homework for money -

It relies on upon how you need to do embed the information. The ideal approach is utilizing parameterized SQL whether it was inline SQL or a put away methodology. The accompanying case utilizes inline SQL. In my illustration I am likewise utilizing DateTime.Now as the Date Time to go to SQL, however you could utilize any Date Time variable from a Date Time Picker control to a figured variable.

RE: Lessons learned - Little new ones, big old ones
Friday, April 07, 2017 1:02 PM by seo services land us -

Moreover, notoriety can bring riches, which additionally implies they have the ability to purchase what they wish, even medications. Carrying on with a traveling life as a "star", and the weight of performing when required, not when you feel like it, makes huge weight on individuals. Such a large number of swing to engineered substances to help them in this.

RE: Lessons learned - Little new ones, big old ones
Tuesday, April 25, 2017 1:03 AM by replica rolex watches -

Thanks for sharing your article. I really enjoyed it!

RE: Lessons learned - Little new ones, big old ones
Wednesday, May 03, 2017 12:30 AM by australian assignment help -

I gained from each oversight I at any point made, and I have told my child who is 14 how I have gained from them (well what is fitting for his age) so he will comprehend and do whatever it takes not to commit similar errors I did in light of the fact that I have never misled my child and he knows it.

GarageBand for windows 7
Friday, May 19, 2017 3:55 AM by GarageBand for windows 7 -

Apple GarageBand is a great music production studio for those who are looking for a software utility to help take their music production to the next level.

RE: Lessons learned - Little new ones, big old ones
Wednesday, August 02, 2017 5:30 AM by Bane Trench Coat -

I would like to thank you for your nicely post, its informative and your writing style encouraged me to read it.

Do my Research Paper
Friday, August 25, 2017 1:43 AM by Do my Research Paper -

Picking a point and refining it to meet the profundity and length prerequisites of your educator.

Buy a Research Paper 
Friday, August 25, 2017 4:07 AM by Buy a Research Paper -

"The experience was first rate! I gave a rubric and the author gave a quality research paper. It was a calm simple affair. Influence your desires to clear and you won't be frustrated."

RE: Lessons learned - Little new ones, big old ones
Wednesday, September 20, 2017 2:57 AM by Essay Writing Company -

Within the beginning paragraphs of Eric Ries’s upcoming book The Startup manner, Eric sets the scene: He arrived at GE within the summer time of 2012 amidst a multi-hundred-million-dollar, five-12 months plan to broaden a new diesel and natural fuel engine. He knew subsequent to nothing about the engine, however, an excellent bit about entrepreneurial management, and GE Chairman and CEO Jeffrey Immelt and Vice Chair Beth Comstock idea the insights he’d developed inside the Lean Startup ought to make certain that the plan could prevail.

RE: Lessons learned - Little new ones, big old ones
Tuesday, October 03, 2017 4:58 PM by Stroke by Stroke -

This is helpful, nonetheless it can be crucial so that you can check out the following website:

RE: Lessons learned - Little new ones, big old ones
Wednesday, October 04, 2017 5:58 AM by The Superior Singing Method -

The best article I came across a number of years, write something about it on this page.

RE: Lessons learned - Little new ones, big old ones
Wednesday, October 04, 2017 7:24 AM by Her Horny -

Gives you the best website address I know there alone you'll find how easy it is.

RE: Lessons learned - Little new ones, big old ones
Monday, November 13, 2017 3:55 AM by Online Essay writer uk -

Working during your studies can decrease the sum that you need to obtain to pay to your studies. Low maintenance work and a cautious spending plan can supplement what you obtain over the late spring to pay for your classes.

RE: Lessons learned - Little new ones, big old ones
Sunday, January 07, 2018 12:44 PM by essay writing company reviews

A lesson learned is defined as a good work practice by the students or an innovative approach that is captured as well shared to promote repeat application to avoid recurrence. Well-documented lessons learned enable to students to further mature project management capability.

Post a Comment:

Comment Title (required)

Your Name (optional)

Your Email (optional)

Your Web Site (optional)

Your Comment (required)








Syndication RSS 2.0 RSS 2.0

All My Blogs:
My personal blogs:
Dev and Publishing Dev and Publishing
Travel and Internat. Living Travel and Internat. Living
Other blogs I contribute to:
Milos Blog (US) Milos Blog (US)
VFPConv. Dev Blog (US) VFPConv. Dev Blog (US)
VFPConv. Dev Blog (DE) VFPConv. Dev Blog (DE)


Blog Archives
All Blog Posts

    November (1)
    July (2)
    February (2)
    January (1)
    December (1)
    October (3)
    June (1)
    April (3)
    February (1)
    January (1)
    December (1)
    October (2)
    September (2)
    July (1)
    June (2)
    May (4)
    April (6)
    March (8)
    February (3)
    January (2)
    December (2)
    November (2)




This Blog is powered by MilosTM Collaboration Components.