Monthly Archives: June 2008

AIR 1.1 : Now with Localization !

For us Danish developers, localization is always a major concern… so the fact that Adobe AIR 1.1 is out now with support for localization just made the platform more interesting…

Adobe AIR 1.1 is a small release that adds international support to AIR applications. In the future, the Flex team will release official updates to both the Flex SDK and Flex Builder that include the latest version of AIR. However, this particular release is happening off of the Flex release cycle so there some inconveniences involved when installing it.

You can read more about it here in Matt Chotin’s short article clearing this up…
http://www.adobe.com/devnet/flex/articles/flex_air1.1.html

And you can download it here…
http://get.adobe.com/air/

Tagged

Google Browser Sync Discontinued in FF 3

If you are as sad as I am that Google have decided to discontinue further development of the Google Browser Sync, please dont hesitate to sign the petition…

You can read about Google’s decision here…
http://googlesystem.blogspot.com/2008/06/google-browser-sync-to-be-discontinued.html

And sign here…
http://www.ipetitions.com/petition/googlebrowsersyncff3/

Tagged , , ,

Introducing acrobat.com

Adobe has recently launched acrobat.com !
Uncertain what the fucture may bring, its quite interesting to see whats gonna happen with this initiative…

Check it out…
http://www.adobe.com/acom/

Tagged

Adobe Flex : Cross-versioning

The “Marshall Plan” is the nickname for the SDK feature to support cross-versioning.

The nickname comes from the aspect of the feature that uses shared events and/or the SandboxBridge to marshal objects across ApplicationDomains. Marshalling was popularized in Windows as a way of transcoding objects so they can be shared between applications in different address spaces.

If the vision comes true, the “Marshall Plan” will define a post-3.1 Flex that liberate developers from having to have all of their code compiled by the same version of Flex.

Read more about this initiative which are planned to be part of the Flex 4 release.
http://opensource.adobe.com/wiki/display/flexsdk/Marshall+Plan

Tagged

The benefits of Functional Design

In continuation of my latest post regarding easily maintainable systems, I will start by writing about the benefits of Functional Design.

A functional design assures that each modular part of a computer program has only one responsibility and performs that responsibility with the minimum of side effects on other parts. Functionally-designed modules tend to have low coupling as concrete side-effect and more importantly, they scale much better than other types of designs.

The advantage for implementation is that if a software module has a single purpose, it will be simpler, and therefore easier and less expensive, to design and implement.
Systems with functionally-designed parts are easier to modify because each part does only what it claims to do.

Since maintenance is more than 3/4 of a successful system’s life, this feature is a crucial advantage. It also makes the system easier to understand and document, which simplifies training. The result is that the practical lifetime of a functional system is longer.

In a system of programs, a functional module will be easier to reuse because it is less likely to have side effects that appear in other parts of the system.

The Standard way to assure functional design is to review the description of a module. If the description includes conjunctions such as “and” or “or”, then the design has more than one responsibility, and is therefore likely to have side effects. The responsibilities need to be divided into several modules in order to achieve a functional design.

To perform Functional Design is quite easy, you can start by defining packages/namespaces based on Use Cases as can be illustrated by the following package definition:

com.hello.usermanagement.createUser

The package above would then contain all the classes which makes up the concrete use case implementation. In the case of a Flex application it would contain at least the Command and Event, but depending of the lines drawn in architecture – possibly the forms and UI objects as well.

This should be seen in contrast to having the Command in a namespace called Commands and the Event in a namespace called Events.

Functional Design has one limitation, and that is that you need an underlying set of baseclasses which implement all your Boilerplate code and thus faciliate that your concrete namespaces dont need to be to highly coupled to other parts of the system on the same level.

Tagged

Maintenance is more than 3/4 of a successful system's life

A frequent question is why we as developers prefer to make quality code and why we hate to hack together a system in order to meet a business objective, typically a unreasonable deadline or an unreasonable amount of time allocated to a project.

The answers is pretty simple, us developers spend apr. 3/4 of our working life maintaining systems – not defining them.
This is the reason why quality in application design becomes desirable at the cost of immediate productivity.

I will address this issue in a series of blogposts where I try to define what I consider to be the constitution of a well implemented system design and what defines an easily mantainable system…

Tagged

Low Coupling

If I should choose only one thing from the knowledge I gained from my software engineering classes at university, I would have to go with “Low Coupling / High Cohesion”…

However, it appears that not all have been introduced to universal truth of the objective regarding implementing this in system design and architecture.

Coupling can be “low” (also “loose” and “weak”) or “high” (also “tight” and “strong”). Low coupling refers to a relationship in which one module interacts with another module through a stable interface and does not need to be concerned with the other module’s internal implementation. With low coupling, a change in one module will not require a change in the implementation of another module. Low coupling is often a sign of a well-structured computer system, and when combined with high cohesion, supports the general goals of high readability and maintainability.

Systems that do not exhibit low coupling might experience the following developmental difficulties:

* Change in one module forces a ripple of changes in other modules.
* Modules are difficult to understand in isolation.
* Modules are difficult to reuse or test because dependent modules must be included.

The concept of coupling is usually related to the concept of cohesion: low coupling facilitates high cohesion, and vice versa. For example, one approach to increasing cohesion is functional design, which seeks to limit the responsibilities of modules along functionally-related boundaries. Modules with single responsibilities tend to communicate less with other modules, which typically causes the side-effect of reduced coupling.

Low coupling may also reduce performance, and a highly-coupled system is sometimes desirable to achieve maximum efficiency. Regardless, in many modern computing systems, the cost of reduced performance is often seen as a worthy trade for the benefits to the software development process that result from low coupling.

If you have no idea what I am talking about or would like to read more about how to obtain this in Flex, there is a pretty good article @ adobe.com that describes it pretty well and in great detail…

Check it out…
http://www.adobe.com/devnet/flex/articles/loose_coupling.html

Tagged ,

Mock Frameworks, not for everyone and everytime

A frequent question is when should I use a mock object framework ?
However, if you have to ask “when”, the answer is probably “not now”. I feel that mock object frameworks are something you have to evolve into.

First, we can talk about mocks in general. Some people have a misconception that mock objects are only useful if you need to simulate interaction with a resource that is difficult to use in unit tests – like an object that communicates with an SMTP server. This isn’t true.

* The real object has nondeterministic behavior
* The real object is difficult to setup
* The real object has behavior that is hard to trigger
* The real object is slow
* The real object is a user interface
* The real object uses a call back
* The real object does not yet exist

If we were to step back and generalize this list, we’d say test doubles are useful when you want to isolate code under test. Isolation is good. Let’s say we are writing tests for a business component. We wouldn’t want the tests to fail when someone checked in bad code for an auditing service the business component uses. We only want the test to fail when something is wrong with the business component itself. Providing a mock auditing service allows us to isolate the business component and control any stimuli the component may pick up from its auditing service. When you start feeling the pain of writing numerous test doubles by hand, you’ll know you need a mock object framework.

Mocks aren’t just about isolation, however. Mocks can play an important role at any time if employed correctly. Mocks can be powerful technique for identifying types in a system based on the roles that objects play … In particular, we now understand that the most important benefit of Mock Objects is what we originally called interface discovery.

Using a mock object framework allows a continuous, top-down design of software. But Aren’t Mock Object Frameworks Complex?

This is another question I’ve been asked recently. Mock object frameworks are actually rather simple and expose a small API. There is complexity, though, just not in the framework itself. As I said earlier, I think there is a path you can follow where you evolve into using mock object frameworks. The typical project team using a mock object framework is experienced with inversion of control containers. Trying to get up to speed on all these topics at once can be overwhelming.

There is also some complexity in using mocks effectively. In Mocks and the Dangers of Overspecified Software, Ian Cooper says:

“When you change the implementation of a method late in the implementation process, mocks can break because you now make additional or different calls to the dependent component that is being mocked. … The mocks began to make our software more resistant to change, more sluggish, and this increased the cost to refactoring. As change becomes more expensive, we risked becoming resistant to making it, and we risk starting to build technical debt. A couple of times the tests broke, as developers changed the domain, or changed how we were doing persistence, without changing the test first, because they were frustrated at how it slowed their development. The mocks became an impedance to progress.”

Mock object frameworks make interaction based testing easy, but can also lead to the problems Ian outlines. Here a couple more reads on this topic:

* Guidelines to Using Interaction Based Testing
* Why Mock Frameworks Suck

In summary – mock object frameworks aren’t for everyone. You’ll know when you need one!

Tagged

Adobe Flex : Linkreports

An important tool when trying to examine an application with the objective to divide it into modules and libraries or generally if you want to understand your application better, is the linkreport compiler option.

Adding the following to your compiler options will print a linkreport upon a successful compile. A linkreport is an XML file which lists all type definitions included in the output as well as the classes it depends on, but has not included.

-linkreport=[FileLocation][Filename].xml
eg. -linkreport=../reports/Linkreport.xml

It will generate the file on disk relative to the BIN directory, so if you want to place the linkreport in a separate directory on level with the BIN directory you have to append ../ to the beginning of the value.

Tagged

Silverlight Tour Workshop

If you are keen on getting up to speed with Silverlight 2, there is a chance with the Silverlight Tour Workshop orchestrated by Wildermuth Consulting Services.

The Silverlight Tour Workshop is a three-day course on Silverlight 2. It divides the content into three distinct areas: Design, Development and the Server-Side. Students should be able to develop Silverlight 2 applications once attending the workshop. The Workshop is structured with a mix of didactic lessons, demonstrations and hands-on labs. Each student will leave the workshop having created several small Silverlight 2 applications. This variety of learning techniques will ensure that all students become proficient in the technology quickly and in an exciting way.

Silverlight is about building Internet applications so experience building web applications is encouraged. In addition, since Silverlight utilizes .NET to build online experiences, familiarity with .NET is suggested. No specific experience with WPF or XAML is necessary.

The schedule is as follows…

* June 16-18, 2008 Washington, DC
* June 23-25, 2008 Toronto, ON
* July 14-16, 2008 Chicago, IL
* August 6-8, 2008 Melbourne, Australia
* August 11-13, 2008 Boston, MA
* August 27-29, 2008 Toronto, ON
* September 1-3, 2008 Denver, CO
* September 22-24, 2008 New York, NY
* September 24-26, 2008 Toronto, ON
* October 22-24, 2008 Atlanta, GA
* October 29-31, 2008 Sydney, Australia
* November 3-5, 2008 San Diego, CA
* November 19-21, 2008 Seattle, WA
* December 1-3, 2008 Dallas, TX

Check it out…
http://www.silverlight-tour.com/

Tagged ,
Follow

Get every new post delivered to your Inbox.