Switch from Internet Explorer to Firefox?

Lately, I seem to have a problem log-in into Gmail from my Internet Explorer, this happens both at work (IE over Vista) and at home (IE over XP). 

I get this wonderfully informative error message: 

gmail

Doing a couple of “refresh” helps sometimes.

But what really helps is using FireFox instead of Internet Explorer- This problem does not happen in FireFox.

Some of my friend and colleagues have reported the same problem.

PHP calling .NET – Running WCF service with basicHttpBinding

I am Writing a PHP application that needs to run a back end .NET application. When creating a running the WCF web service out of the box, the PHP could not connect to the web service.

The problem:

The PHP returns "Caught exception: Cannot process the message because the content type ‘text/xml; charset=utf-8’ was not the expected type ‘application/soap+xml; charset=utf-8’."

 

The reason:

WCF is running a new version of web services than expected by the PHP.

 

The solution:

Change the binding type of the WCF service from binding="wsHttpBinding" to binding="basicHttpBinding".

This insures that your .NET web service would support clients and other services that conform to the WS-I standards.

 



You can see an example of such configuration in my blog posts named:

PHP calling .NET – PHP to WCF communication

and

PHP calling .NET – PHP to WCF calls with parameters

Tip: Visual Studio 2008 fails to debug WCF web service

When trying to debug a WCF ( windows communication foundation) .NET 3.5 framework library, you might encounter a problem where Visual Studio (VS 2008) refuses to run or debug the WCF web service.

 

the problem:

The error you get from the WCF test client when trying to debug the WCF service is this – "WCF Test Client: Unrecognized option ‘targetclientversion’ specified"

wcf fail

The solution:

1) Close Visual Studio

2) Install the latest version of Windows SDK for Windows Server 2008 and .NET Framework 3.5

3)  open Visual Studio again

 

This solved the problem for me.

I love my MVC …

If this was a comics style blog it would start like this:

They both stood there, the clean and virtues super-hero MVC and his arch-enemy the dirty and corrupt spaghetti-design-pattern… they were both aware that only one of them will prevail.

The fact is that real life is more complicated than that, writing code is an on-going process and sometimes you need to “get things done now” instead of “get things done right”. The important thing is to keep in mind the important notions  that lays behind MVC.

So who is this super-hero? From Wikipedia: Model-View-Controller (MVC) is a design pattern used in software engineering. In complex computer applications that present lots of data to the user, one often wishes to separate data (Model) and user interface (View) concerns, so that changes to the user interface do not impact the data handling, and that the data can be reorganized without changing the user interface. The Model-View-Controller design pattern solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component- the Controller.

While MVC might take a little more time to design, the notion of decoupling presentation, logic and data layers is imperative. Code that has been written this way can easily be changed without enforcing changes on other layers of code. Because it is a well known fact of life that things always change, agile code makes our life easier and simpler. It is also usually makes the code more comprehensible.

On the other hand you have spaghetti code, it is takes no planning at all but changing it is a nightmare. Moreover, spaghetti code is incomprehensible and as the saying goes: “Always write your code as if the person who will maintain it is a violent psychotic who knows where you live.”

So keep your layers decoupled and live longer and happier.

BTW: if you don’t know which song was playing while I wrote this blog see the title or click here.

Scale out versus scale up – How to scale your application.

When designing enterprise application architecture, talking to clients and doing interviews for my group, I sometimes tackle the “scale up vs. scale out” software architectural dilemma.

To set the stage lets define what scale means as well as what scale-up and scale-out mean.

The problem domain:

We have an application that serves about a 100 users (an online video store web site for example). Now, all is dandy and the application is running fast and smoothly. But then our application becomes more popular and more users want to use it at the same time. Now the application needs to serve thousands or even millions of users. The application is becoming sluggish and non-responsive because it runs out of computing power, memory or network bandwidth. There is an irony in this situation because this is what we hoped for (millions of users) and this is the time when we need the application to work at its best, while in reality this is when most applications tend to fail.

The scalability solution:

scalability is a desirable property of a system, a network, or a process, which indicates its ability to handle growing amounts of work in a graceful manner.

There are two kinds of scalability strategies:

Scale up (Scale vertically) means to run the application on a stronger computer.

Scale out (scale horizontally) means to run the application on many regular computers.

If we think of this in terms of a housing problem, these solutions make more sense.

Let’s say we have a family house with five people in it.

house

After a few years the family grows and is now composed of ten people and there is no more room. What do we do?

Scale up would mean to put everyone in one big building:

house scale up building

Scale out would mean to put these people in several small size houses:

house scale out sub

Scale up – pros and cons:

Pros:

This is a straight forward solution that does not demand a change in the architecture of the software we write. You just run the same application on a stronger computer.

Cons:

On the other hand, the problem with scale up is that it is a costly and not an infinite solution. Big computers, like houses, cost a lot and there is a physical limitation to the computing power and memory you can have in a single computer.

Scale out – pros and cons:

Pros:

If planed right, this solution offers infinite scalability, when you need to support more users you just add more low cost computers to your server farms.

Cons:

On the other hand, this is not a straight forward solution. You need to design, architect, and develop your application to be ready to scale out (this is a topic for another blog I plan to write)

Conclusion:

For small scale application scaling up might be cheaper and faster to develop and implement. Having said that, most large scale applications, such as Google, Amazon, and Microsoft, use the scale out solutions in order to handle their scalability challenges.

Bottom line conclusion – if you plan for success do some pre-thinking and additional development to make your application scale out ready.

How to make money from open source / open source revenue models

A friend asked me the other day: “I heard you work for an open source company, must be frustrating not making money from your code… how can you make money if you give away your code and IP?”

Well, I have been asked this question many times, and it is time I put my answer in writing:
You do not make money out of open source. You can, however, use open source to create profitable revenue channels and sell other products and services that are related to open source.
There are at least three revenue models based on open source leveraging:

1) Dual license model

Release the product under a restrictive open-source license and provide an alternative proprietary license. This is a good strategy if you have some sort of monopoly, if you are a market leader or have an open-source product that no one else has in the open source world.

Motivation: The client really likes the open-source product and needs it for commercial use. He does not want to breach the open-source license and is willing to pay for a proprietary license.

Open-source license: GPL is the only suitable license to this strategy because of its restrictive constraints and its viral behavior (you need to be GPL to use GPL).

Example: MySQL

2) Dual product model

Penetrate the market by releasing an open-source product, sell a different product (extended version, plug-ins or an application that is based on the open-source product). This is a good strategy if you have an up-hill struggle to become a market leader or if there is strong competition. You utilize the open-source to become a well-known business technology leader.

Motivation: The user gets to be a part of an open-source community process, contributes to the source and improves it. Users purchase other related products from the project professionals.

Open-source license: MIT, BSD, Apache or any other non-copyleft license.

Example: eclipse and its non open source plug-ins.

3) Professional services model

Sell support/customization and other Professional services. This strategy requires a large base of clients that want to use the product. In addition the product must not be simple to use or else users will not need any professional services. There is no problem implementing this strategy combined with one of the other strategies, in fact it is recommended as a complementary strategy for both.

Motivation: We are the experts in this open-source project because we wrote it, therefore clients would like to purchase support and other services from us.

Open-source license: Any

Example: JBoss

I am currently exploring other ways and I will keep you up to date.
You might also read these articles:
Does the open source professional services business model suck?
Software As A Service Takes The “Free Beer” Out of Open Source

Why is Java-enabled hosting so expensive?

Why is Java-enabled hosting so expensive?

Hosting a website is a cheap matter these days. One could get a fairly good shared hosting package for around 1.5-6$ per month. These hosting packages offer a wide variety of features including support for PHP, PERL on LINUX or ASP (or ASP.NET) on Windows and MySQL DB. The problem is that prices soar when you want JSP/Servlet support.

I think Java should be as affordable as PHP and .NET or else it will loss a lot of private developers to the competitors. Expensive Java hosting is a problem when you want to deploy a privately-held/budget-aware website.

I like Java and wanted my open-source website to be written in Java. At the end I had to settle for PHP (which is cool too).

Why should ASP/PHP enabled hosting cost 1.5-10$ per month and Java enabled hosting cost 12-30$ per month?

Amir Shevat
2006-09-07T10:47:14-08:00
[Amir blog and articles]