Sadek Drobi’s Blog

August 7, 2007

DSLs bringing the end of single language development?

My second contribution in InfoQ. An interesting news post about DSLs, and language oriented programming.

http://www.infoq.com/news/2007/08/multi-lingual-programming

March 14, 2007

Refx :: Martin Fowler on MODIFIABILITY (QCon)

  • In agile development process, the Design task is still important, we just changed the way we do it to evolutionary design rather than un upfront one. Yet, In some cases we cant defer design decision till the end, and we do need to do them in an upfront style. 

Do the simplest thing that works ( Kent Beck )

  • Kent Beck commented on this that “The simplest thing is not the most stupid !”
  • Software SHOULD have a model, and cant be only tachtical all the time.
  • In a Lean Software Development we dont make decisions before we really have to, but we have to do them once! or otherwise we will be taken as not able to make decisions.
  • Try different choices on different teams, building different implementations, find that last minute where you can decide.
  • The key to modifiability is encapsulation and abstraction.
  • The key question is : Do i have to make the decision yet?
  • The Domain Model is made! The task is to reflect it well in the software.
  • Isolate Domain models from technical ones
  • Preparing a ground for Modifiability
  • Making a decision of when to make a decision
  • Discuss well with business people to reflect the model
  • Html is undoable because there is not a ig investement in doing it
  • Breaking encapsulation for a decision makes it a bad decision
  • redability of code
  • Unit testing to guarantee encapsulation
  • Software evolves anyway, maintainability IS an issue!
  • Encapsulation is about keeping secrets.
  • Pair progamming for teaching design, that will raise team’s productivity as a whole
  • Lessons can be learnt better through modifiability than through upfront teaching
  • Struggle for reversable architecture

February 25, 2007

Obsev :: Implementing Domain Friendly, Predicates-like Specifications with C# 3.0 Expression trees

According to Fowler and Evans, Specification ” is to separate the statement of how to match a candidate, from the candidate object that it is matched against. As well as its usefulness in selection, it is also valuable for validation and for building to order “  .

We might need to secify the state of an object for one of these three purposes.

  • To validate an object to see if it fullfills some need or ready for some purpose (Validation)
  • To select an object from a collection (Selection)
  • To specify the creation of a new object to fit some need (Building to order)  *Quote from DDD / Eric Evans*

(more…)

January 7, 2007

OBSEV:: Fluent Interface and c# 3.0 Extension Methods : The flexibility of dynamic typing with the powerfull AutoCompletion

Filed under: Architecture, C#, Martin Fowler — Sadache @ 11:12 pm

Fluent Interface  is a pattern discovered by Eric Evans and Martin Fowler.

one problem of this pattern is  ”a mismatch between what a fluent interface needs and our usual guidelines for API design. What works well for a regular API doesn’t work for a fluent one and vice versa .” (Fowler)

So using FluentInterface we start adding setters that have a return value, others that they should not belong to the class in the API terms, but they do in Dsl terms.

Martin suggested an Expression Builder, which is a class that contains these bizar methods, But that means more classes, moreover, returning an interface of that Expression Builder that only contains allowed methods will add even more files and interfaces!

then He stated “dynamic languages work better for DSLs since they tend to have (more…)

Powered by WordPress