Metadata-Based Validation

This Artima article links to an IBM developer works article which details how validation in
one place in an application can extend throughout different parts of the
application.  I’ve wanted something like this ever since I played with
Modula-3 in college.  Modula-3 made it so easy to create new constrained
types that I finally saw the power of such constraints.

My dream of a system would work something like this:

1.  Define your data objects and include something which contrains this
data.  In Java this could be annotations.  In .NET this could be
attributes.  In other languages, or pre-annotations Java, it could be
something else, it doesn’t matter, but annotations/attributes definitely make
things easier and nicer.

2.  If I am mapping to a database, the ORM should read these attributes
and contrain the data at the database level.

3.  If I create a UI (web, console, windows, gnome, applet, it should
not matter) certain control types should be infered and other control types
should be validated.  For example, if I have a data member which is an
enum of three values, a textbox is probably not the best input control.  A
drop down with three values, or three option boxes may be better.

4.  If I create a non-U-I (a non-user Interface) (web service?) the
contraints should be enforced, preferably at the service layer.

I would really love this.  Scaffolding would be far more useful with
this type of Metadata in my objects.  People directly accessing underlying
databases have less chance of inserting or modifying data to “garbage”. 
Contraints were pushed down to the database level.  Of course, ideally no
one would connect to the database directly, but the real world is not ideal.

http://www.artima.com/forums/flat.jsp?forum=276&thread=175992&start=0&msRange=15

http://www-128.ibm.com/developerworks/java/library/j-hibval.html

AADND – Ann Arbor Dot Net Developers meeting September 13th at SPARK

Please join us on Wednesday, September 13th at SPARK for the 8th Ann Arbor Dot Net Developers meeting.  The meeting starts at 6pm and usually lasts until about 8:30pm.

Jay R. Wren (me) will be presenting Mono.

Mono yields some great opportunities to propel Open Source and Linux even
further into the mainstream. Mono is an Open Source implementation of a
runtime environment and libraries designed and created by Microsoft known as
the .NET Framework. There has been much controversy and misinformation about
its performance and licensing issues in the Open Source community. Some of
these issues will be dispelled and others will be displayed in a new light.
Some of the best desktop application available today are written in C# and
run in Mono. Mono has some excellent tools available, some of them are
better than tools available for systems which have been around much longer.
Mono supports nearly all of the protocols and libraries with which Open
Source developers are familiar. In this session, we will introduce Mono.

Jay R. Wren learned to program at age 8 on an Atari 800XL. Two years later
the family got an Amiga 1000. He learned to program structured procedural
basic. Amiga Basic 1.3+ didn’t have line numbers! This background helped
immensely when he moved to programming PASCAL and C and later C++, Java,
Python, PHP, Perl, Pike, and finally C#. He started using Linux as a desktop
operating system in 1995. He put himself through Oakland University for
eight and a half years and obtained a bachelors and masters degree while
working, usually full time. After seven years of working as a Systems
Administrator and a Network Administrator, Jay decided to switch direction
slightly and put the computer science degrees to work by entering the field
of Computer Programming and Software Engineering. After trying to teach
himself the whole J2EE thing, frustration with the XML configuration files
and overall system lead him to try this Microsoft .NET thing. Very shortly
he was hooked and diving into the open source implementation of it, called
Mono. He has been using Mono and .NET since fall of 2004.

We will have our usual format including valuable news about local .NET technology, opportunity and jobs.  Pizza will be privided.

This meeting is open to the public and is free to attend.

For more information see our website:  http://www.aadnd.org/

Domain Driven Design (DDD) and Service Oriented Architecture (SOA) are both important

Alex Hoffman gets it!

DDD and SOA Are Unrelated.

I don’t think I would use the word unrelated, but the are definitely NOT two different ways of thinking. I guess this is a pet peeve of mine. DDD is also not a replacement for Object Oriented Design. Rather, DDD “is a way of thinking and a set of priorities…” according to http://domaindrivendesign.org/.

Domain Driven Design as the primary driver to solving a problem. SOA is simply a set of guidelines for best exposing this solution. I wouldn’t say that they are orthogonal. I might say that they are parallel. I wouldn’t say that they are totally unrelated, but I would say that they are independant of one another. However, the ease of exposing your design as a service would be a reflection on the design of your domain so there is some intrinsic relation there.

Both of these items should be on the checklist of “good software” when designing a new application or system. It is fine to simply say “no, we won’t ues that” to each of these items when going down the checklist, but in my opinion they should at least be considered for each and every project.

State of Michigan Judicial District Advice of Rights

1. You have been brought to court on a misdemeanor charge. You have the following basic rights:

a. To plead guilty or not guilty or to stand mute. If you stand mute, a plea of not guilty will be entered. You may plead no contest with the permission of the court.

b. To have a trial by judge or jury.

c. To have the assistance of an attorney.

2. You have the right to an attorney appointed at public expense if you are indigent (without money to hire an attorney) and if

a. the offense charged requires a minimum jail sentence, or

b. the court determines that it might sentence you to jail.

3. You may have to repay the expense of a court appointed attorney.

4. If you have a trial, you have the following rights:

a. To call witnesses to speak for you at trial. You may get an order signed by the court to require witnesses to come to court.

b. To see, hear, and question all witnesses against you at trial.

c. To be a witness for yourself or to remain silent. If you choose not to be a witness on your own behalf, the prosecuting official may not comment on your refusal to testify.

d. To be presumed innocent until proven guilty beyond a reasonable doubt.

5. If you plead guilty or no contest and your plea is accepted, you will not have a trial of any kind and will give up the rights listed in items 2 and 4 above.

6. You have the right to be released on bond.

7. If you are now on probation or parole and you enter a plea of guilty (or no contest) or a finding of guilt is made by judge or jury, it may result in a violation of your probation or parole.

8. Except for alcohol or substance abuse/driving offenses or unless otherwise advised by the court, you can be sentenced up to 93 days in jail, fined up to $100.00 plus costs, or both. (The court will advise you if there is a minimum jail sentence.)

9. Fines, costs, and other financial obligations imposed by the court must be paid at the time of assessment.

10. Possible sentences and license actions in alcohol or substance abuse/driving and retail fraud cases are shown on the other side of this form.

11. An appeal to circuit court may be taken within 21 days from date of sentence.

12. If you require special accommodations to use the court because of disabilities, or if you require a foreign language interpreter to help you to fully participate in court proceedings, please contact the court immediately to make arrangements.

from http://www.courts.michigan.gov/scao/courtforms/misdcriminal/dc213.pdf

found by http://www.google.com/search?q=state+of+michigan+advice+of+rights+213

digg vs. slashdot, Sean Kelly me too

Sean Kelly was more systematic in his trial of digg, and he gave up reading /. entirely.

http://seankelly.tv/blog/blogentry.2006-08-28.9543029912

I hate to say “me too” but yup.  Me too.

I’ll still browse digg, like I browse slashdot.  I read headlines only, if that sounds interesting I read a summary.  In the case of both I rarely go further.  If I do go further I’m always more pleased by the result if the source was slashdot.  Most of what is on digg is absolute garbage.  I’m consistently let down by what other people find interesting.  I’m disappointed in my fellow man.  Oh well, I shouldn’t be wasting my time on such sites anyway.  I should be coding.

Nick Malik is right on – SOA is really just OO applied to distributed systems

http://blogs.msdn.com/nickmalik/archive/2006/08/18/705685.aspx

Nick writes a little bit about OO design, mentions some patterns and an IoC
framework and then basically says that all of this stuff is here just to help us
do good design.  I agree.  Much like any tool at your disposal, all of
these things can be misused, but that doesn’t make them bad.  They key is
to learn to use the tools well. 

I just really liked when he wrote “SOA is really just OO applied to
distributed systems”.  Yes yes yes!  Thank you!  Unlike what
others read and think about SOA, Nick got it right.  I still say that Yogi
got it wrong.  SOA is not a replacement for OO.

I also like that Nick comes right out and says “So we are doing what we
always do…”  That is what I’ve been saying for a while now. 
Unfortunately, many people see Web Services and SOAP and they don’t see
SOA.  They do see a one size fits all way for RPC.  I guess that is
ok, but it is typically because they didn’t spend enough time on a good
design.

 

Whiz kids, hackers, crackers, and security professionals

Whiz kids, hackers, crackers, and security
professionals, my company consideres you insignificant.

I was taking one of those corporate quizes.  If you
have ever worked in a larger corporation, you will know what this is, but
if you haven’t, it is a way that corporations try to train their employees on corporate
conduct policies.  It is usually things like “Lock your PC when
you walk away from your desk” or “What should you do with paper that
has sensitive customer information on it”  with answers like “burn all paper evidence”,
“put a sticky on my monitor with the password attached”, “post social
security numbers and names to as many websites as possible”, and “place
confidential date in locked up place, or in the shredder”.

Well I just scored VERY low on a 5 question test at work.  40%.  2
of 5!  I’m dumb founded.  I’m even more dumbfounded over this
question:

A significant network/application
security threat to most organizations comes from:

So I guess this means that I don’t have to worry
about whiz kids, nice hackers, mean hackers, or security professionals? 
Yes, I checked all 5 and I got it wrong!

Other questions which I got wrong include “What should you do in the event you see someone without a
badge?”  I didn’t see an option for “kick their ass” so I picked the
“ignore them” option.  I mean, if i can’t inconvenience someone with an ass
kicking, why would I do something like escort them to security, or tell
security?  Well, OK, I’d probably tell security, but that option was B and
everyone knows never to answer B.

Also incorrect was “You receive a virus alert from a
friend in another company with all various warnings (e.g. “Pass this along!”,
“This is critical”, “This virus could blow up your computer!”) ”  
said “delete it without worrying about it”.  I’ve been in the computer
industry for well over 10 years now.  I’ve seen the rise of the internet,
the rise of network travelling viruses.  I remember floppy disk
viruses.  I don’t run virus protection software and I don’t open email
attachments.  I’m not stupid, so I don’t get viruses.  When I get an
email that says something like that, the first thing I think is JUNK MAIL. 
Options which I did not consider were: “send to everyone in outlook list”, “send
to my office friends”, and “send to my help desk”.  Well of course I was
not considering that the target of this “Quiz” is jane and joe office computer
user.  They aren’t qualified to make decisions about what is safe and what
isn’t.  While I consider myself technically qualified to make that
decision, it is not my role at my job, and thus my job probably does not want me
to make that decision.  Why can’t I be a good drone?

 

current music: Rhapsody of Fire – Son of Pain