» Publishers, Monetize your RSS feeds with FeedShow: More infos (Show/Hide Ads)
Since I arrived here in the United States, I’ve been arguing with myself to choose a mobile phone to use. To now I was using a very poor Nokia phone that I got with my prepaid plan on my arrival.
Doing some research here and there, I finally realized that my best options are Apple iPhone and Google Nexus One. As I’ll describe later in this post, I chose to go for the Google phone and received it earlier today. Many of my friends have asked me to share my experiences with them as they’re in doubt to switch to Nexus One; therefore, here I write a review based on my first impressions on the first Google mobile phone called Nexus One.
Before, jumping into the details, it’s worth mentioning that I have a good background to judge on the qualities of this phone and compare it with Apple iPhone, Windows Mobile, and Blackberry devices. In Iran I used to have Windows Mobile devices for 5-6 years, and I’ve used my friends iPhones for a very long time as I feel I’ve had one. I also tested Blackberry devices by friends a few times so I think that I can compare the features of these phones. Also unlike, many people in the world specifically many of the ordinary Americans who die for Apple products with no apparent reason, I’m not a biased person for any of these companies and my regular readers should have known me during the time. Therefore, if I write anything in this review, it’s solely based on my technical perspective and nothing more.
Order
As I arrived here with two bags of clothes only, I ought to order many things to start my life. In the past three months I never had a great experience as I had with Google Nexus One order yesterday.
As I’ll describe later, I decided to buy an unlocked phone directly from the Google website. I put my order online and asked them to engrave my name and blog URL on my phone.
The default processing time for engraved phones is 72 hours and I went to take a short nap, but receiving a call in less than 3 hours from FexEx automated notification service, I woke up and noticed that they already have engraved my custom text on my phone and have shipped it via FedEx. This was very surprising indeed.
My phone was sent via Standard Overnight service by FedEx and arrived here at my address in less than 24 hours. I received it and unpacked my phone quickly!
In my honest opinion the online ordering experience with Google was amazing!
Unpacking
The packaging was excellent but I don’t think that it can compete with Apple product packaging. Initial setup was easy and fast but obviously, the phone relies heavily on a good internet connection on the phone to have almost all the functionality.
One initial problem that I noticed was the account signing-in process for my Google account. While I had my fast Wi-Fi connection at home and T-Mobile 3G network was also available without any problem, Nexus One took half an hour and several attempts to initially sign in and synchronize with my Google account.
Plan
My story with my monthly plan is something long that shouldn’t concern you but for some reasons I couldn’t sign up a contract with Apple, and it turned out to be a good thing later. I signed up for a 2 year contract with T-Mobile and waited for almost a month to evaluate my options.
Doing some research on different forums, I realized that the best trick to get a Nexus One is to get an unlocked phone and use it with your existing plan even with T-Mobile that offers a service with Google. Honestly, the deal between Google and T-Mobile isn’t good at all and many people have been complaining about it.
In my experience, the best way to get a Nexus One and use this phone is to get your plan from T-Mobile and use an unlocked phone. The good point is that T-Mobile has a deal that gives you all the features you need on a monthly basis without mandating you to sign a long-term contract.
Of course, everybody knows that AT&T is not a good operator at all. I’ve had some interactions with their customer service and they were all frustrating. On the other hand, T-Mobile has one of the best customer service qualities. Yesterday, I asked them to add the data plan to my service and they did that quickly and easily.
One point worth mentioning is that I didn’t get any text message service for my plan as I’m not a big fan of text messaging (being a Ph.D. student and wasting your time?) and I don’t need to send many text messages in a month to pay $10 per month. Luckily, Nexus One comes with the best integration with Google Voice and I can send unlimited number of text messages for free. I thought that this may be considered as an advantage of an unlocked phone because it doesn’t enforce you to get the whole plan from T-Mobile. I just hope that they don’t stop this feature in the future revision of the Android even though it seems far from the reality with the policies that Google has exhibited before.
Hardware
Nexus One comes with one of the best hardware available on any mobile phone in the market even I think that I’m safe to say that it has the best set of hardware.
Hardware specification is an area where it proves to be much better than iPhone, many of the Windows Mobile devices, and Blackberries. It has a very fast Qualcomm 1 Ghz process, 512 MB of Flash memory, and 512 MB of RAM memory. It has a big 3.7 inch display and 5 megapixels camera. Android platform 2.1 is installed and it supports all the common GSM/EDGE standards as well as Wi-Fi, and Bluetooth. Besides, it has AGPS receiver, Cell tower and Wi-Fi positioning, Digital compass and Accelerometer.
Putting all the hardware specifications together, Nexus One is definitely a powerful phone, and I’m seeing it in action myself.
Platform
This is an area that Nexus One is a leader for sure. Android is much more powerful than iPhone OS (OS X iPhone). One big weakness of iPhone is lack of multi-tasking support which is bolder when I turned on my Nexus One to stream a radio station while was receiving latest tweets and emails in the background, and was checking the Google Maps simultaneously! I don’t think that I need to compare it with Windows Mobile and Blackberry!
Besides, the development process for iPhone platform is something complicated. I’ve started a new post series and am writing about it on a regular basis. In one of the recent posts I wrote enough details about the pain of development and deployment of an iPhone application!
Furthermore, Android is an open platform that lets many people work around it easily without worrying about limitations. So the applications built for the framework are mostly free or cheaper than equivalent iPhone applications.
User Experience
In my opinion iPhone is slightly better in this area. Nexus One is very powerful and in many situations it has the same level of user experience as iPhone does, but there is only one area where it shows some weaknesses: navigation buttons! I found the physical navigation buttons/shortcuts a little hard to use and sometimes they don’t respond very well. I don’t think that they’re necessary at all but most likely Google had the intention to show that they haven’t imitated something from Apple.
For all the other scenarios Nexus One is as great as iPhone even in some areas it’s better because it seems to have a better Operating System and hardware.
Connectivity
I tested my phone and called some friends and received a few calls. The quality of the voice is great on both sides. I also tested my phone with my home Wi-Fi connection as well as T-Mobile’s EDGE and 3G networks and it worked very well. Obviously, I got much better results with my 3G connection on T-Mobile in comparison with AT&T! I can’t blame Apple for the connection problems with AT&T but with iPhone and AT&T you wouldn’t get the high level of quality that you can get with Nexus One and T-Mobile.
Graphic
In this area Nexus One is slightly better than iPhone. In my experience the level of graphic and video on Nexus One is noticeably better than what you can experience on iPhone. Of course, better hardware can be the main reason for this.
Applications
Although iPhone has more applications than Android available, Android applications are mostly free or cheaper than their equivalent iPhone applications. Also Android is younger and its current number of applications seems to be equivalent to the number of applications for iPhone at this age.
Nexus One comes with a great set of pre-installed applications and has a fantastic integration with various Google services which means that you won’t feel the power of Nexus One unless you have a good internet connection on your phone.
I installed some applications on my device and found very rich and powerful applications available for my purposes.
Camera
I took a few photos and videos with my new phone and really loved the quality. Nexus One should have the best camera among all the well-known mobile phones available in the markets today.
Maps
Google has proven to be the best in this area and has ported this power to Nexus One as well. Nexus One is much better than all the other phones when it comes to maps and directions. I really loved the speed and quality of Google Maps on my Nexus One.
Voice Recognition
I tested the voice recognition feature on my new phone and it worked fine. I had heard that this is another area that Nexus One rocks but so far I haven’t seen any noticeable difference with other phones.
Engraved Text
One cool option for unlocked Nexus One phones is to engrave two lines of text on your phone, and I used my name and blog URL on my phone. I found this a very nice idea that is not offered by the vendors for iPhone, Windows Mobile, and Blackberry.
Conclusion
So far I’ve enjoyed my experience with my new Google Nexus One mobile phone even though it’s not a very long time that I’ve used that. It’s hard to judge on mobile phones these days as the competition is very close, but in my honest opinion Nexus One takes the lead at present with some better features and qualities that it provides.
I try to work more with my new toy and if I found something big to share, I’ll post it here or on my Twitter account. If you have special questions about the device, feel free to leave a comment and I try to answer you.
Recently I started to write a new post series to share my experiences and show the development process of an educational iPhone application that we’re building for our graduate Software Engineering course this semester. After giving a general overview, I talked about the vision of our application, and now I want to talk about the deployment process of the application even though we haven’t finished the development of our project.
A very common part of any development process is deployment of the software into the host machine or machines. iPhone/iPod Touch development is no different and you need to follow some specific steps in order to deploy an iPhone application.
One of the early tasks in development of our educational iPhone application was deploying a sample application, called MoveMe, to our devices, so we understand the deployment process. Interestingly, I found this step the most challenging and frustrating part of iPhone development for myself and my teammates to this point.
Basically, iPhone application deployment process consists of two groups of steps: legal steps to obtain specific permissions from Apple and technical steps to deploy the application to a device.
Here at the beginning I’d mention that we are using an Apple University Program that makes some points a little different, however, I think that I can assume the same major steps for deployment of a commercial iPhone application as well.
As I had stated before, development of an iPhone application can be done only on a Macintosh machine and you can’t use other platforms such as Windows or Linux to accomplish this goal. Likewise, you can’t use the available Mac Virtual Machines to do this.
In essence, these are the steps to be followed to deploy an iPhone/iPod Touch application to a device:
- Create an account on iPhone Developer Program Portal.
- Add team members and information to the account.
- Generate and authorize appropriate certificates.
- Authorize your iPhone or iPod Touch devices on the portal.
- Generate Application IDs on the portal.
- Download and run your provisioning profile from the portal.
- Deploy your application.
As you see, this is very different from the regular deployment process for other mobile platforms that have a few straightforward steps. In this post, I try to give a brief explanation of each step. As you see in a moment, such a long process is error-prone and can be difficult and it is indeed. In my experience almost all my classmates had problems with one or more steps of this process.
Create an Account on iPhone Developer Program Portal
The first step for a team leader or administrator is to go online to the iPhone Developer Program and enroll to create an account. Enrollment costs money and you need to pay $99 for a Standard program account or $299 for an Enterprise program account. There is a short comparison of these programs on the Apple website that you can read. We were lucky to use our university accounts to be able to log into this portal!
This is one of the very bad points that I found about Apple. This is beyond the scope of this post but I see no point in this mechanism to enforce developers and companies to pay you in order to develop something even very simple for your platform.
After logging into the portal, you need to navigate to the iPhone Developer Program Portal to follow the next steps. It’s worth mentioning that you have access to some good guidelines and videos on this portal that can help you learn how to follow the steps to deploy your application.
Add Team Members
In the second step you need to add your team members to the portal so they receive an invitation code via email to register on the portal and register.
If you’re a member of a team, you may start your deployment process from here because your team leader, administrator, or manager has gone over the first step and you only need to use the invitation code to register on the portal.
Generate and Authorize Certificates
The third step is to generate a Certificate Signing Request on your Mac machine. This can be done by opening the Keychain Access application.
Go to the Preferences menu and set Online Certificate Status Protocol (OSCP) and Certificate Revocation List (CLR) to Off.
Choose Certificate Assistant and then Request a Certificate from a Certificate Authority, then enter your information. Don’t forget to use the same email address that you have used on the portal. Choose to generate a 2048 bits key size with RSA algorithm for your certificate. Finally, save the generated certificate somewhere on your machine.
Go to the iPhone Developer Program portal and navigate to the Certificates page. Click on the Request Certificate button to upload your certificate, then wait for this certificate to be approved. Certificates must be approved by the team administrators and they will be notified by email. When they approve the request, a Download button appears next to your certificate in the Certificates page and you can download the file.
After downloading the certificate to your machine, you need to install it on Keychain Access so it appears in the list of certificates with the appropriate name.
Authorize the Device
The other task that has to be done by the administrators is to authorize the devices that host your applications. Each iPhone or iPod Touch device has a 40 character unique identifier associated with it that can be found in iTunes, Xcode, or iPhone Configuration Utility.
Administrators need to go the iPhone Developer Program portal and choose the devices page to add each device with an appropriate name and its unique ID.
Generate Application IDs
Each iPhone/iPod touch application has a unique identifier that should be associated with the application and be added to the Provisioning Profile. Application IDs enable some features in iPhone OS 3.x such as Push Notifications.
Application IDs can be either a unique ID or a wildcard. The latter type of application ID can be used for several applications.
There are some details about different components of an application ID called the Bundle Seed ID and Bundle Identifier but I don’t go over these details here.
If you need to use an application ID for Apple Push Notification service, then you need to follow additional steps as well.
Download the Provisioning Profile
After generating the application ID by the administrators, a provisioning profile name and ID should appear in the Provisioning page on the program portal where developers can click on the Download button to get their provisioning profile.
Next you need to add this Provisioning profile to your Xcode development IDE. Doing this correctly, you should see the name of your Provisioning profile in the Organizer window.
Deploy the Application
Having your application developed, and the above steps completed successfully, you can deploy the application to the authorized device. You can test you applications using the Xcode Simulator for different versions of the iPhone OS, but obviously, that’s not enough and you need to deploy the application to a real device to make sure everything works properly.
After selecting your device from the list of devices in the drop down list, you need to choose your application name in the Targets sub-tree in the left pane, and then click n the Info item in the menu.
This opens up a new window where you need to go to the Build tan and find Code Signing setting item and select your provisioning Profile from the list that appears next to the Code Signing Identity.
Now have to open the Properties tab and put your application ID in the Identifier textbox.
At this point, you should be able to click on Build and Go button in Xcode to build and deploy your application. If everything is set properly, then you should see your application deployed to the device after a few seconds.
In the first post of this series I wrote about the educational project that we’re going to build on top of the iPhone/iPod Touch platform for our graduate Software Engineering class and gave a quick overview of the elements of iPhone development.
An infancy of our project was to choose a good idea regarding the requirements defined by our instructor and some other requirements that we had in our team. In this post I’m going to describe this idea and different aspects of its implementation in regards to the educational nature of this project.
Overview
We formed up a group of four students for this project. Apparently, we didn’t know each other and were not aware of the level of knowledge and experience of other team members. Our instructor, Dr. Shonle, requested us to work on the idea of this project after putting some general requirements on what we can do. We also had our own limitations as individuals and as a team. This part of the project was a critical part because we had to be careful and choose an idea that can meet the requirements and can be implemented in a timely manner with the effort that we could put into that.
Requirements
We had two types of requirements: those imposed by our instructor and those imposed by our internal limitations.
Our instructor had defined the following limitations for our project:
- Do not implement games unless they are educational.
- Do not implement projects that need to maintain a third-party server.
- Do not implement any idea that can be implemented as a single web-page or as a spreadsheet. Basically, this implies that we have to avoid some regular data-in/data-out ideas.
- Implement your project in an incremental approach, that is, build a simpler core and then add additional features as time goes.
- Implement your project as a team by splitting the work into smaller modules.
- Deliver the project by the end of the semester by documenting everything as weekly blog posts to share your knowledge, experiences, resources, and tips.
Besides, we had our own limitations as individuals or as a team:
- We are all novices in iPhone development and Objective-C. Choosing an ambitious idea could be challenging in the limited time that we have.
- Initially, we’re not aware of the availability of third party libraries and different APIs provided in Cocoa. For example, choosing an internet-based idea could become tricky as we had no idea how powerful the built-in APIs are in helping us to implement the networking/communication aspects.
- As graduate students, we have many responsibilities and we have limited time to dedicate to this project. This is one of the aspects of the Software Engineering knowledge that we have to earn in this class.
- The idea chosen had to be familiar to everyone in the group because we didn’t have time to spend on learning the idea, itself. For example, we could work on a Twitter client or a MetaWeblog API implementation but these could involve learning the idea itself, and even learning some other concepts.
- We also came to the agreement that it’s better to avoid using databases in our project because it could enforce us to learn new stuff as well.
Ideas
Having the abovementioned requirements in mind, we decided to share our ideas and describe them, so each team member submitted an idea to our internal Wiki. We received eight ideas:
- Secure PIN: Applying the concepts introduced in another graduate class, this provides a more secure and alternative mechanism for authorization of users to login to their device. The default PIN is not very secure and everyone watching the owner of the device can get the PIN code and use it.
- Reverse Polish Notation calculator: The basic idea is to implement a calculator using the postfix notation.
- 3D Tic-Tac-Toe game: The implementation of Tic-Tac-Toe game in 3 dimensions that requires some tricks in Data Structures.
- Instant Messenger: A simple open source instant messenger.
- Step Counter: A helper tool for patients or weight watcher to monitor their steps.
- Programmable Time Schedule: An scheduler to assist the person to manage his timetable with reminders.
- Medicine Database: A quick reference of medicines by symptoms so the user can enter the symptoms and get the related medicine.
- Contact Reminder: A tool to display reminders regarding different tasks and events for some contacts such as birthday reminders.
We discussed pros and cons of each idea and nominated two ideas for our project: Secure PIN and Reverse Polish Notation calculator.
The Secure PIN had a sweet and noble idea that had a good level of flexibility and had a very sweet nature that could replace the default PIN authentication mechanism in iPhone/iPad Touch but the implementation of the user interface and algorithm could become challenging somewhere in the middle. Fortunately, one of the team members had implemented this in C# as a Windows Forms application but we had no idea how difficult it can become if we try to implement the same APIs in Objective-C with Cocoa. One drawback for this idea was that it’s very difficult to replace the default PIN mechanism in iPhone operating system, so the idea couldn’t become practical.
The Reverse Polish Notation was a straightforward idea that was known to all team members and all the team members seemed to have a good level of knowledge and background to understand and implement it, and we couldn’t find any major drawback for that except the fact that there were many other calculators with different implementations available for the platform.
One advantage of this idea was its nature to be split in different modules to be implemented by different team members. This was an important point for our course.
Reverse Polish Notation
The Reverse Polish Notation (abbreviated as RPN) is one of the common notations used in mathematics and Computer Science to represent mathematical expressions. RPN uses a postfix notation for expressions to evaluate them. In some circumstances, this notation is handy in calculating mathematical expressions.
This notation is common in Data Structures and many other aspects of Computer Science such as Programming Languages and Compilers. The basic idea is to push operands in a stack and pop them to apply an operator to them.
How Does It Serve the Community?
First we have to define the community that this application serves to. This community can be either as wide as all iPhone/iPod Touch users or as limited as the group of developers interested in learning the programming for this platform by reading examples and codes.
As a calculator, this idea can be helpful for those who want to use the Reverse Polish Notation in their calculations on iPhone and this is the practical aspect of this idea.
As an educational project that may be released as an open source work, it can help others learn some aspects of iPhone development by reading the code. This project is specifically a good showcase of data structures implementation in Objective-C and iPhone.
Points for Future Expansion
One of the advantages of this idea is that it can be started as a simple core by implementing arithmetic expressions and then can be expanded in an incremental manner to have other mathematical operations and/or memory storage features.
Modules
This project can be broken to smaller modules in various ways, but one of the simplest and most straightforward ways for our group was to divide it in the following modules to be assigned to our group members:
- The user interface
- The stack display
- The stack and its management
- The calculation engine
This is a very good separation that can help our team members work on their assigned parts individually and then combine them in a single application easily.
Prototype
We built an initial prototype of a horizontal user interface for this system.
Basically, the user interface consists of two half: the left half is the user input area to get numbers and operators, and the right half is the output area to show the stack and the result of calculations.
Implementation
Hopefully, we start implementing this project this week and we will use a source control system along with FugBugz as our bug tracking software. Our plan is to build and test our initial modules then combine and test them as a whole. After that, we are going to expand these core features by adding the future expansion points described above.
Beginning my studies here in the US and for the first semester, I’m assigned a Teaching Assistant position for an undergraduate course on Programming Languages. One of the major goals of this course is to get students familiar with major features of different categories of programming languages as well as the differences in implementation of some basic features.
The instructor of the class, Dr. von Ronne, has decided to use Scala as the main programming language for projects defined for this class, and students are supposed to use this language to build an incremental project and compare the features of Scala with other languages taught in the class.
To get students started with the language I went over the principles of Scala and functional programming in two sessions at the beginning of the semester (back in mid-January).
As some of you may know, Scala is a programming language that combines the Object-Oriented and functional programming features from the two major paradigms of programming languages (declarative and imperative), and was founded and released in 2003 by Martin Odersky, a German scientist. The name of the Scala language comes from Scalability and it truly delivers a high level of scalability. The language is designed to be expandable and flexible.
Scala has proven to be the best attempt in combining Object-Oriented and functional styles in a single programming language. The good point about Scala is that it doesn’t come as a completely new language and just tries to refine the Java platform or the .NET Framework. Scala is more known for its integration with Java and the .NET branch hasn’t been very active (most likely because F# has become the mainstream functional programming language for the Microsoft community). Scala has a compiler and an interpreter for Java and has a great set of features enhancing the functional programming style.
The other interesting point about Scala is that it derives many of its features from existing languages and tries to get the best out of the previous experiences.
I put all these introductory information in a set of slides for a short presentation in to start the class. I thought that it may be helpful to published them here for those who may be interested to have a background in Scala. You can download the slides in the PDF format from here.
If you’re interested to learn the basics of Scala in a practical manner, Simply Scala is a great website to use with its tutorials, and if you’re looking to learn it in a more advanced level, Programming in Scala is a rich book written by some authors including Martin Ordersky, himself.
I know that it’s been quite a long while that I haven’t written anything on this blog and it marks a record in my blogging history. Moving from a country to another and starting a new life specifically as a graduate student has its own difficulties that eat all your time.
However, the good news is that now I have some obligations to blog at least once a week until the end of this semester and it gives me a good chance to return to blogging covering new topics that may not be very related to the .NET world!
For this semester I’ve taken a graduate Software Engineering course with Dr. Macneil Shonle (recently, we’ve been finding many clones of Scott Hanselman!) and as a main part of our duties for this course, we’re supposed to work on a software project as a team.
The software project for this course is something that should run on top of the iPhone/iPod Touch platform and we need to form groups of 4-5 people. We’re supposed to collaborate on this project and deliver it in a timely manner (by the end of the semester) and follow an incremental approach to build a useful application. Besides, we’re supposed to prepare documentation and information about our work individually and specifically blog about our experiences on a regular basis. Surely, this is good news for my blog readers.
Apparently, Dr. Shonle had some goals in mind by defining this task for us:
- Force students to work as a team and learn about all the team-work concepts
- Help them learn about new platforms and technologies especially with a funny project for the iPhone platform
- Contribute something to the community by building new applications.
- Learning Software Engineering concepts and applying them in a real-world project in action.
Therefore, I’m going to publish some blog posts in the next three months on this blog and cross-post them to our internal Moodle blog to get some points! I try to share my experiences, opinions and the challenges that I face with, so my readers can grasp an understanding of the process of programming with the iPhone/iPod Touch platform.
To be honest, I’m not a big fan of Apple and haven’t used their products that much, and I’m not planning to do that for ages. I know that there are many people who find their products exciting but as a matter of a fact, I see no point in what they do except one thing: improving the user experience. As a technical user, this is not a big deal for me. As I’ll point in a moment, I got some bad impressions from my first experience with Apple product development.
iPhone Operating System
The iPhone Operating System has derived many features from the Mac OS X and of course, has altered many of them or has introduced new features appropriate for a mobile device, so those who have written programs for the Macintosh operating system should have an easier job learning the process of building an application for the iPhone platform.
The iPhone operating system can be considered as a hierarchical multi-level stack of technologies included in a single platform. This consists of four main layers from bottom to top:
- Core OS
- Core Services
- Media
- Cocoa Touch

The first two levels are fundamental layers that provide more basic functionalities and features, services, and interfaces such as APIs to work with files, low-level data types, network sockets, etc. These programming interfaces are mostly provided in C programming language.
The third level, media, provides several APIs to work with graphics, audio, and video, and combines C and Objective-C languages in its interfaces.
Finally, the upper level, Cocoa Touch, which is basically the main layer that programmers deal with is a higher level API provided in Objective-C to let you apply many of the common tasks in your code.
Typically, an iPhone application is written on top of the Cocoa Touch layer but if you can’t find relevant APIs for your work, you may dig deeper and use APIs from the lower layers.
Software Development Technologies
Building an application for the iPhone platform can be done using several approaches. The default approach, as many of you already know, is applying Objective-C and other development tools provided by Apple. This is used by most of the applications written and released on AppStore.
But the other approach that may be familiar to the fellow .NET developers is MonoTouch, a technology released as a part of the Mono project to let .NET developers apply their knowledge in the .NET development to build applications for the iPhone platform. Basically, MonoTouch binds .NET APIs to native APIs that I described above. It also has a good integration with Xcode IDE that I’ll describe later in this post.
My dear friend, Wallace McClure has written a Wrox Blox about this technology that is worthwhile to read for everyone interested in using this technology.
Unfortunately, MonoTouch is a commercial product and despite our interest to use it for our project, the pricing wasn’t fair for our educational purposes so we ended up with the default approach (using Objective-C).
Objective-C
Objective-C is a reflective and Object-Orientated derivation of the C programming language that adds a messaging style to the C language.
Objective-C is mostly known for its wide usage in Apple Mac OS X and iPhone development. If you’re going to develop for Apple products, you definitely need to know this language in a very good level.
Knowing the C programming language and being familiar with the Object-Oriented concepts, you have a straightforward way to learn Objective-C syntax and style of programming.
Apple developer guide has a good introduction to this language that can give you a basic idea of the language.
Development Process
The development process of an application for the iPhone platform is very similar to programming for many other mobile platforms like Windows Mobile or Android, but some legal phases to get permissions from Apple add to its complexity that in my opinion seem to be a very annoying part of development process for iPhone platform.
Following some steps, you need to sign up on Apple website and submit your generated local certificates to get a Provisioning Profile (after getting approved by Apple) to use on your machine.
As an academic project, we have access to Apple University Program and had an easier process to get our profiles approved here. We have received a set of iPod Touch devices from the university to use for this project and test our code.
After having the Provisioning Profile, and registering your devices on the Apple website, you can start building applications using the below-mentioned tools. After building your applications, you can test them on a local emulator, and then you can deploy this application to your device as well.
Here is a simple example that can get you started with the programming style for the iPhone platform.
Development Tools
Another major limitation of development for the iPhone platform is that it mandates you to use a real Mac machine to write your code and deploy them to your devices. So whether you use the default technologies or MonoTouch, you need to run everything on a Mac machine (and you can’t use a Virtual Machine neither).
Having this important requirement, you can use a rich set of development tools provided for the iPhone development. The most common IDE to use for Mac OS X and iPhone development is Xcode.
You can also use the Interface Builder to put a rich set of controls and user interface elements for Cocoa on your application surface.
Here you can see a good description of the main development tools you can use for iPhone development.
Time is accelerating every year and it's really difficult for me to believe that another year is going to end. I think that it was yesterday that I published the post for Christmas 2008!
It's Christmas time and for the first time in my life I'm in a country where it's celebrated by the people and it's been a very interesting experience for me so far.
I hope everyone a Merry Christmas and wish that you have great holidays that will be followed by a better year. From my perspective, 2009 appeared to be a better year for the whole world than 2008 and I hope that 2010 continues the progress.
As of myself, 2009 was much better than the last 4 years preceding it. Although it didn't have an amazing beginning and even had a frustrating middle, but the last few months were much better and could erase many bad memories for me.
After arriving in the US, I'm still in Austin but thank to Mehrdad, I've been able to complete many of the initial tasks and hopefully, I'll move in to my apartment in San Antonio during the next week.
Speaking of my status, I've had a good passion to publish some technical posts in the past month or so but as I was relocating, I didn't have a Windows machine to write any code, and also didn't keep up with the news. Anyway, unlike 2009, I hope I can write more in 2010.
Or it could be as simple as “Hello America” but it's hard to forget the past good days in where I grew up and found myself.
In today's web, thank to Twitter and Facebook, cats don't live inside the bags anymore, so it didn't take a long while for that cat to get out of that bag. Yes, the cat is out the bag and as Jayson, my dear friend, has written on his blog, I'm already here in the US!
I didn't have any intention to write about it here on this blog, and was trying to hide everything in regards to these matters from the public, but I thought that I have to, at least to thank some great friends that helped me overcome arduous problems in the hardest process in the world. Yes, getting to the US for an Iranian citizen is so hard and we owe that to our governments. The second hardest thing in the world is getting a Ph.D. in the US and I'm going to do that, too!
I had a very long and tiring journey from Tehran to Doha then to Houston, and finally to Austin that took 28 hours, and I arrived on December 8. I've been here staying with Mehrdad, my very great friend who was such an influential person in taking me here, until I recover from the jet lags. Shortly, I'll move to San Antonio to settle in there to begin my doctorate studies in Computer Science by concentrating on Programming Languages and Compilers design. I'll be there for the next few years until I earn my Ph.D. and I hope that I can earn it as soon as possible.
To be honest, my intention to get back to the academy started a short while after graduating from the university in 2006, and strengthened during the time. Older readers would remember how happy I was when I got out, but soon after going out to the society and working space, and involving in the military service, I realized that this life is not my type and I'm supposed to do something else. Since then (almost for 3.5 years) I had a very tiring, arduous, and sometimes frustrating process to come here to the US for my graduate studies, but thank to all the help and support from some friends like Mehrdad Ebrahimi and Kouroush Ardestani (Robin Pars), I finally made it!
As everyone knows, the past few years of my life were such a mess. Serving in the armies was a total shit and the next 1.5 years had their own difficulties, but recently they turned out to be so helpful to me and making me mature enough for the future events that could melt everyone without strengths. So I should confess that I had some big mistakes about many of those events, and have to apologize for writing some disappointing stuff about them on this blog from time to time. If I go back in the time, I will definitely choose to serve again and pass all the troubles because without the experiences to live under difficult conditions and resist to many problems, I was unable to complete this process. Luckily, I had the chance to have a strong background and resume to go directly for my Ph.D. and save 1-2 years of this wasted time in the military service.
It's hard to write about the motivations to earn a doctorate degree and I don't think that anyone can understand that except those who have engaged in such a program. At some point you notice your talents and what God has put inside you. To be honest, I also realized that it's hard for me to deal and work with ordinary people and it yields complains on my side as many of their actions don't make sense to me. I'm not saying that others are good or bad. I feel that we have different worlds and that's all. Therefore, I was looking to be somewhere and work with some people who are closer to my opinions and viewpoints, and the best place could be the academy.
Besides, I chose to come here to the US for several reasons. The first and foremost one was the unique and world-leading education system that is much stronger when it comes to the Computer Science because almost everything in the computer world is introduced and developed here. I was looking for a real cutting-edge research and it wasn't easy to find it in many countries including Iran (despite the very strong system that we have in there and many of the new generation youth don't know). Furthermore, if I had to choose a third country to be in for a long while, it could be the US because I knew their language, culture, and many other things much more than any other country in the world, and I proved to be good at communicating with these people mainly because we share some interests specifically the passion to lead and be that number one thing!
All in all, to make the long story short, I switched from doing what everybody does and what the environment forces me to do to something that I'm supposed to do, and it's my purpose to be in this world. Unfortunately, this costed me too much but after all, I'm happy with everything happened. I could start my Ph.D. at 22 or 23 but still I'm so young and maybe one of the youngest Ph.D. students here at 25 specifically as I met many people studying at college at my age even older.
The upcoming years are hard as earning a Ph.D. is, naturally. It's harder for me because I'm switching from Mathematics to Computer Science, and am going to live in a new environment missing my family, and that's usually difficult for Persians as we are very emotional.
Leaving my homeland was really hard, and it was a matter of choosing between losing some stuff to have new achievements when I was doing that. I won't be there for the coming years but I hope that our people can get their share of liberty as they proved to deserve it. Believe me or not, there aren't many nations in the world who truly care about their freedom to sacrifice their bloods for it. I think that all the recent events showed the huge difference between the Iranian nation and the regime, and I hope that Iranians can get a better assistanship from the outside world rather than some stupid sanctions that are eventually weakening them and empowering the dictatorship.
In the end I have to thank everyone who helped me in any way in this process again, and thank the American nation, especially these warm Texans, in advance for hosting and enduring this monkey for the next few years! I hope that I can contribute back to this country to assist them in accelerating their progress that has slowed down in the past decade. The least I can do is opening up new job opportunities and a leading position for them with my research even though I've proven to be able to do more.
Humankind can go and get to any point that he imagines. It just mandates him to really want it, and put enough effort into that, and I've experienced that in my life several times. I never earned anything in one night (even disregarded anything came to me that way) and achieved everything by hard-work and it's been the main reason I could continue my progress in the time.
These days it’s hard to find someone who doesn’t know about Twitter as a social networking status updating site mainly founded in 2007 with the very simple and basic idea to let people share their status on the web with 140 characters and follow others’ updates.
I was among the first group of users who appeared on Twitter and have been continually tweeting for almost three years to now, so I’ve been able to witness the progress of the site and the way it evolved.
The idea behind this service was very simple that had been tried by some other sites before, but Twitter was able to gather a reasonable number of known people to incorporate because it had a very simple and basic structure, and was founded by some of the well-known names on the web. In this while many rivals have appeared to challenge this success but none of them could go so far.
As many other people have stated already, in my opinion over half of the Twitter’s success was related to its simple idea and implementation that despite the technical issues in all these years, has helped it survive and get more users. This simple core allowed developers and other companies to build services and sites to complement the basic structure and make it suitable for specific applications, and inspire it as a general platform for content publishing for various applications; therefore, a diverse group of users benefited from the service whether for personal updates, entertaining stuff, technical matters, or anything else.
Like any other service or site, Twitter had its own progress. From a perspective, there were two waves of progress for Twitter: the first wave was the appearance of new users as individuals, companies, or authorities, and the second wave was the addition of new features by Twitter leadership to improve it or by adjunct services or client applications to simplify a task for the users. Most of the features added to the core service/site were inspired from these third party tools and projects that could gain a widespread popularity among users.
Both these waves had a good progress and quickly took Twitter from a very lower point to somewhere that is now a de facto standard of online communication among many individuals, colleagues, companies, media, and politicians. I can exemplify this by pointing to the main role of Twitter in post-election events in Iran or its usage for communication between the American nation during the last presidential election. Likewise, it’s used widely to share the news, opinions, and interesting updates about some events such as Microsoft, Apple, or Google conferences.
On the other hand, as I had written before, Twitter and micro-blogging came to challenge blogging and had their obvious impact on the frequency and quality of blogging and online publishing for almost everybody around the world.
However, despite all these matters, recently I came to the conclusion that Twitter has begun to worsen, and is slowly losing its active role on the web, and that’s the reason for me to write this blog post.
I think that there are three main threats challenging the future success of Twitter:
- Development of the service and appearance of more users, specifically ordinary people, on the site without considering a good mechanism to maintain the privacy and quality.
- Leaving the simple nature of the service by implementing some new features by Twitter leadership/developers.
- The advent of Twitter spammers and spamming on the site specifically in the trending topics.
The Number of Users - A Double-Edged Sword
The first and foremost threat for Twitter is the number of users! With almost no exception all the social networking sites founded during the Web 2.0 era had a similar progress starting from a lower point, evolving with a good speed by adding good features and attracting users, and stopping at a higher point, then slowly losing the quality. The only exception that I can note is Facebook and I’ll explain why.
Apparently the number of users is a very important factor in the success of a social networking site (even though I personally consider the level of education and sophistication of the users as the primary factor), so all these social networking sites compete to get more and more users on board. This isn’t necessarily bad because it brings a wider community of people to contribute and improve the level of communication and information sharing. But if not handled in a good way, this also has its own drawbacks that even can drive the whole community to a bad point.
Usually social networking sites begin with a small group of users that are often technical people and community leaders. These users are innovative, sophisticated, and well-aware of the culture of online life, so they communicate wisely and take the site to a better point. When new users, that are mostly more ordinary people, come to such sites, less or more, they lack that level of sophistication and awareness and it can have a huge impact on the quality of the content. If the site administrators don’t handle this wisely, it can cause the growth of mushroom-like groups of users who disturb the site. I think that everybody can notice this on many of the social networking sites such as the first-wave sites like Orkut or middle-wave communities like MySpace.
I believe that the best way to prevent such issues on a social networking site is to isolate users to some degree, so they let each other communicate if and only if they’re interested to do so. In other words, a powerful privacy management mechanism can maintain the independence of users on a site, so even if someone is bothersome, he or she bothers his or her friends/contacts only. I believe that this is the main reason for Facebook that has let it continue its growth and success. Facebook allows all users to have full control on their privacy settings and share certain information with their friends.
In my experience (that is easily provable by reviewing the history of social networking sites) the number of users is a double-edged sword that if controlled and managed, can help a site succeed, otherwise, it becomes the main weapon against the site, itself!
Unfortunately, Twitter lacks a good mechanism to allow its users to maintain their privacy. While I’m a big advocate of simplicity in the core service and site (as I’ll explain in a moment), I strongly believe that the privacy is the only area that mandates a lot of features even complex features. Being able to make something public or private/protected is not enough! Here I note that obviously the type of privacy settings would be different from Facebook or other sites. For instance, I always wanted to be able to hide certain people that I’m following from the public eye to prevent some people from stalking (thank to Steven Smith for introducing me to this term).
Recently I protected my own Twitter account and removed many of my followers for this specific reason. Since then I’ve been rejecting most of the follower requests to keep a small but active group of followers for myself who aren’t possibly a threat to my privacy.
Complexity - Back to 90’s
In the introduction text I stated that simplicity was the key factor for the growth and success of Twitter but in the past couple of months they have forgotten this principle and have been adding some unnecessary features (in my opinion these features are redundant for the main site) with a very bad implementation. Two notable features are the Lists and the Retweet button. Not only these features aren’t necessary for the site, but also they’re implemented in a very ambiguous and complex way, so still I have difficulties in understanding which is which with each feature. In my honest opinion Twitter hasn’t made things complex. It has taken an step further and has returned to 90’s days of poor user experience needing a guide to teach each and every user what to do!
I’d like Twitter to be as simple as it was before, with a textbox that lets me write 140 characters of text only, and I’d like this service to be complemented by a rich API that allows me to expand this basic idea for anything I need. If I want to Retweet, then I can go and download from hundreds of clients that have much simpler and richer Retweeting features. If I want to categorize my contacts, I can go and use one of those clients or online services.
Basically, it doesn’t make sense to see Twitter leadership focusing on these redundant features while there isn’t a single day that all users don’t see those funny errors. Why don’t they concentrate on scaling up the service to handle all the requests rather than adding new features? Isn’t it obvious that the former one has more priority?
Spamming - The Old Enemy of Content
The last main threat to the success of Twitter is our old friend, spamming. This one is the natural cause of this type of content publishing. There are various types of spam and tweeting has its own spam as short text messaging does. On Twitter there are two general types of spamming: one that follows many users to receive some mutual followers to publish advertisements for them, and another that uses the popular trending topics to promote something in front of thousands of eyes. These spam updates are slowly growing and disturbing the relevance of content.
The problem with Twitter is that it still doesn’t have a very effective mechanism to block these spammers and filter the content and solely relies on user reports. Of course, one technical difficulty is the length of Twitter messages that are short enough to prevent automated anti-spam methods from filtering them.
Conclusion
All in all, I haven’t liked Twitter recently as I used to in the past. Different people have different expectations from the people they follow and from the general content. Some people are interested in technical discussions, while some others are interested to read technical news and links. There are some users who like to see personal status updates, but there are others who like a combination of different types. There are even people who just want entertaining images, videos, and jokes!
I’m not very interested in those personal status updates even though I don’t reject them all, but there are some users who salt it!
Besides, in my understanding the usefulness of live event reports is lowered on Twitter as there are more people who repeat something over and over. One instance was this recent PDC09 event where I was witnessing something repeated by many people. Believe me, it becomes boring at some degree! I’m lucky to follow a very limited group of community leaders only!
To summarize my discussion I have to say that Twitter needs to revisit its new strategies, otherwise I can’t imagine a better future for this site. You, as dear reader, may argue this and oppose to my statements here but usually such predictions rely on experience, and only time can prove what is right and what is wrong.
As of my own Twitter account, I’ve been thinking about stopping it and continuing everything on my Facebook profile where I’ve been so active recently. I think that tweeting doesn’t have much value for this world while I and many other people can save our time and effort to use them for more beneficial tasks.
It’s PDC time, and unlike the last two conferences, I haven’t been very active in publishing the news and my opinions about it. PDC used to be one of my favorite technical events before, but to be honest, the last two conferences were very disappointing for me.
As you may have noticed, these days I’m more like a listener than speaker, and would like to read others’ content rather than writing my own blog posts on different topics, however, this great post by Frans made me write my own opinions on Windows Azure and cloud computing stuff that are being presented in this huge atmosphere by Microsoft because I believe that this whole thing is not a big deal to have such a noise around it, and somehow Microsoft is exaggerating about the products that it has provided in this area.
In PDC 2008 and 2009 Ray Ozzie has been focusing on Windows Azure and the nature of cloud computing as the future of software world and Microsoft development technologies, and has been stressing that they’re trying to provide an integrated set of tools and a unified model of software development based on cloud computing for Desktop, Mobile, and TV devices.
I have no comment on the latter assertion as I also admit that Microsoft is good at providing integrated solutions and it’s one of the main reasons for its success in this field, but I think that I’m not at the same line with Microsoft and some fellow community leaders on the importance of Azure at the moment. In essence, I believe that Microsoft has missed many things in between that had to come before Azure in the mainstream and has quickly jumped to something that is far (maybe impossible) from becoming the main concern of common software development scenarios. I try to develop this and explain my reasons in the below paragraphs.
I know PDC as the main Microsoft event for developers in which they try to introduce and showcase the newest products for software developers, and have a set of different sessions in various categories to teach developers some general information about the new technologies to get them started, and send them to the community and their companies in order to promote these products and spread the word. PDC 2003 and 2005 were great examples of this strategy and I can recall them as two great conferences that had a huge impact on the Microsoft community and follower companies for years.
In my opinion Bill Gates was a great leader for Microsoft and one of the key points of the long-time success of the company was the fact that he was able to predict the main requirements of the software world to invest in them. He knew when to enter the video gaming field by a console, and when to enter the mobile world with Windows Mobile. On the other hand, he also had some mistakes and one of them was the inability to recognize the importance of online search and advertisement, and they’re still unable to catch Google in the field!
PDC 2000 and 2001 focused on the .NET Framework and new generation of Visual Studio and in 1-2 years they became the mainstream because there was a huge demand for a cross-platform technology for software development. In PDC 2003 and 2005 they introduced enhancements in the .NET Framework and new technologies such as ASP.NET 2.0, ASP.NET AJAX (formerly known as Atlas), WCF, WPF, and WF, and you saw that they had their own demand in the past few years.
Here I’d stress that the reason that all these products could succeed was the real demand that was there for them among ordinary software developers and companies for common software projects. The set of classic controls and wizards in ASP.NET 2.0 or ease of AJAX development in ASP.NET AJAX were some stuff that were becoming the common demand for developers.
But PDC 2008 and the current one, 2009, are far from that point or at least it’s hard to believe for me that the main topic of these conferences, Windows Azure, can have that demand in the coming years. I think that Microsoft leadership has the wrong imagination of the current situation in the software world.
The first question that comes to mind is about the importance of cloud computing in the main software development world? Putting some discussions that support the assertion and are all made by evangelists aside, do you, as some ordinary software developers, believe that cloud computing is the main area of the software world in the next 3-5 years? What is it coming to solve? What is it coming to help with? Are these concerns the main concerns of all software developers, teams, and projects, especially yours? In my experience, the answer is a simple “No”!
The second question is, if cloud computing is really necessary, do we really need such a big and complex structure to respond to our needs? Why can’t we use another solution such as those provided by Amazon or Rackspace? Why should we go this far and put all this effort in Windows Azure? In other words, even if cloud computing is a major concern, what are the advantages for Azure over its smaller rivals that are simpler and easier to implement? Even if there are some software projects needing a cloud solution, I do think that most of them will be satisfied with very simpler solutions.
The other challenging point is about the precedence of cloud computing in comparison with other requirements in the software world. How can you run a software on cloud when a simple change and redeployment requires a recompilation? Yes, I know that Dynamic Extensibility has been a field of work in the .NET Framework but it seems that it has more priority and precedence over cloud computing while it hasn’t received it yet.
The last point is somehow related to the politics of software. Considering that Windows Azure is going to host enterprise large-scale applications, we all know that most of such applications fall in two categories: strategic applications (such as those written for banks, militaries, etc), and big commercial applications that would be comparatively less. How many governments and banks are ready to host such strategic applications on Microsoft data centers? I think that you know the answer yourself!
Besides, this Azure wave is something more like an imposed discussion by Microsoft evangelists to the community than something really demanded by people, themselves. There were noticeable demands for say, new features in ASP.NET 2.0 or ASP.NET AJAX, but I can’t see such a demand except those encouraged by Microsoft evangelists.
Having all this stuff said, to me it seems that in the current economic situation the best thing to work on is some ways to automate the Software Development process, accelerate the coding speed, and reduce the overall costs of a project for companies. I think that this could be a better area to invest in than cloud computing.
As a side-note, it’s very interesting for me that Microsoft conferences have become a place saturated with evangelists to spread a noise about something to advertise it. Microsoft wants to force people to accept its products and technologies rather than attracting them to use. At this point, some readers want to find me and kill me!
The bottom line is that they can waste much money on holding such relatively expensive conferences, giving fantasy keynotes with 3D glasses, and asking people to cheer them (the people who have paid to come and watch this fantasy), but the software market in the world is demanding something else, and if they can’t respond to these demands, they’re letting their rivals take the power. What I see is a huge group of community leaders and talented people who prefer to stay at home, and even don’t watch these keynotes and follow the stuff because they’re becoming so boring.
Windows Azure should be a great technology for a company like Microsoft to host many of its own services and upcoming integrations on it, but I doubt that it can be something appropriate for the main body of the software world.
My blog subscribers would remember that earlier this year during the new Persian year holidays I had a short trip to Shiraz and Isfahan, wrote about my trip, and uploaded a huge batch of photos to Flickr. It’s a matter of a fact that Iran is saturated with historical sites and natural attractions very suitable for tourism, but after the Islamic Revolution, the new regime hasn’t done much to maintain these sites and advertise to attract more people to come, visit, and enjoy them.
Fellow .NET community members, specifically those who are active in the ASP.NET development, should know Mads Kristensen as one of the ASP.NET community leaders, Microsoft ASP.NET MVP, and the founder of BlogEngine.NET that is one of the very prominent and widely-used blog engines powered by ASP.NET.
At that time Mads had seen my photos, and as a very active tourist who has travelled to many countries, he told me about his interest to come and visit these places. Fortunately it didn’t take that long for him to make his travel arrangements and finally he arrived at Tehran with a group of friends yesterday.
Mads and his group have a very busy schedule to go to Shiraz, Yazd, Isfahan, and Kashan in the next days and leave Iran, but I was lucky to meet him in Tehran tonight.
I spent a few hours with Mads and one of his friends, Tobias Haagen Michaelsen, who's also a professional Software Developer.
Since Microsoft is not that old and after our revolution in 30 years ago, there were comparatively less tourists coming to Iran, I think that Mads Kristensen is the first prominent .NET community leader who’s coming to Iran.
We had a traditional Persian dinner together (even though I was on one of those bad diets and couldn’t eat anything more than a few pieces of Iranian Kebab) and talked about Iran’s history, all these distinct races living in Iran, our culture, our customs, my own plans, and of course, the software world.
Mads and his friends are going to leave Tehran tomorrow but they’ll stay in other cities for some days and visit many places in different central areas. I hope that he and his buddies enjoy their trip to Iran and this makes good memories for them from our country and our people.
Not only in the software world, but also in almost every aspect of our life, sometimes we need to make small movements rather than making big plans just in order to activate a work and let it proceed. I think that this BlogML release is such a minor change to reactivate the project after a long time.
Background
Unlike what some people think about the BlogML project as something originally started by me, BlogML was a pet project started by Darren Neimke in 2005 with a few initial versions that subsequently improved a proposed specification and a corresponding .NET API. The idea behind BlogML was simple yet nobel: to represent the content of a blog with an XML derivation. There were two general advantages for such a format: the ability to back up/restore the content of a blog on the same blog engine, and the ability to move the content of a blog from one blog engine to another.
Version 1.0 of BlogML was the first mature version that could earn a good reputation and wide usage on the .NET community, and I joined to the project and Darren at this point by implementing a converter for Telligent Community Server.
Since then I was an active contributor to the project for almost two years and got the help from other team members to take the project to the next level. We moved the project from GotDotNet to CodePlex as one of the first projects hosted on the new open source community by Microsoft, and implemented BlogML 2.0 specification and .NET API to releas it in September 2006 in which we basically added a set of new features to the project. Version 2.0 has been the most stable and widely used version of BlogML ever, and since then we’ve been hearing about new implementations and migrations done by this standard. We even heard about the good use of BlogML on other communities while BlogML is already a part of all prominent ASP.NET blog engines.
To be honest, I have to admit that BlogML needed more attention after version 2.0 and could be much better, but my military service and the fact that no one else had taken any role in leading the project suspended everything. There were some errors and complains as well as comments and suggestions reported for the project, but being busy with my conscript and books, I had no time to think about this project.
I had a few attempts to implement a new version of specification and the .NET library in this while but the codebase, itself, was also daunting enough to distract me and stop my work.
As a matter of a fact, BlogML is a great idea and the best of its kind and the proof for this assertion is the growing usage of this standard despite its long suspension and some problems it has. But its original design that was inherited in later versions isn’t relevant for today’s software world at all. There is no documentation for the specification and API, and things are ambiguous for someone new. Additionally, the Writer part of things are implemented by manual XML operations while the Reader part is implemented using the serialization techniques in the .NET framework. Having these said, one big problem for solving the issues was that I had to maintain the compatibility with the previous versions and some inheritances were restricting me from going far. It’s also worth saying that we didn’t have time to unit test the .NET API for version 2.0, so we couldn’t have a good level of quality assurance in that version.
Therefore, all my attempts failed in reactivating the project until just recently when I finally decided to go for a fresh new .NET API that doesn’t care much about the old structure. I was smoothly working on this new version until Saturday when Phil Haack reminded me of a few issues specifically a very bad bug in the .NET API that forced me to drop a minor version as 2.1 to resolve this issue.
Seeing this encouraged me to neglect the whole compatibility thing and go for a fresh new specification as well because some inheritances in the specification were also restricting further work on the standard.
BlogML 2.1
So BlogML 2.1 is just a minor revision with a very small fix to a very big bug, and I have to confess that it was my fault that I hadn’t tested this to catch it before the release.
This new version doesn’t change anything with the XSD schema and other stuff. It only updates the .NET library but you even don’t need to worry about compatibility or recompile your projects. All you need to do is replacing the previous .NET assembly with the new one to resolve the issue. All the existing converters and tools that work with BlogML 2.0 will work with BlogML 2.1 assembly.
But the issue is with embedded file attachments that are supposed to be stored in Base64 format, however, that bug was adding a sequence of constant A’s to the output.
You can download the new version from the CodePlex workspace that contains both the binaries and source codes.
The Future Perspective
This was a good reason to push me forward in accelerating the development of BlogML 3.0 codenamed Haacked, a new fresh version of this standard. I’m going to contact some members of the team such as Darren, Phil, and Simone to ask about their thoughts and comments to plan for the next version, but I strictly want to have a Beta out by the end of the year.
While there should be many stuff coming out from our conversations, I think that there are some big changes happening for sure: hopefully, we’ll move the project off the CodePlex, and will rewrite the specification and .NET API from the scratch. For the new .NET library we’ll use a very simple and straightforward API using the standard framework design guidelines, also will use a Test-Driven approach to make sure we’ll meet a minimum level of quality.
I’d also like to see a rich documentation written along with each and every phase of development added to the project even though I’m lazy to do this myself, and I hope we can get new team members to help with such stuff.
Speaking of new contributors to the project, it’s a very sad fact that the whole .NET Open Source community is limited to some specific contacts and specific project types. You may not agree with me on this, but for a long time I’ve been having negative impressions on what is called an open source community around the .NET. Many of these projects are ported from the Java and a reasonable number of prominent projects are focusing on specific areas such as blog engines, forums, photo galleries, O/R mappers, etc. The fact that there wasn’t even a single developer to take the responsibility of BlogML during our long absence was very disappointing as BlogML has a relatively simpler structure than other open source projects while it has a great potential to become a de facto in blog standards.
All in all, I hope that we can reactivate the project and proceed with a better quality, and also get new active members on board to assist us in development and documentation.
Looking in the past is usually nostalgic for many people including myself specifically in the past few years after passing 20 as I ought to waste much time for things beyond my power like the military service.
One of the advantages of having an old blog like this is the opportunity to go back and read your own archive to see what has happened in your life, and how you’re changed! Yes, it’s now the fifth time that I am writing about my birthday on this blog. It means that I’ve been blogging here non-stop for the long and important era of 20-25 when many things happened in my life. I began blogging when I was 20 and today I become 25 to hit one of the important points of life! By the way, it may be interesting to go back and read my posts for 21st, 22nd, 23rd, and 24th birthdays!
A few months ago I read an article about aging and feelings that come to a person from a psychological point of view. In that article the author had mentioned that there are some milestones in our lives in which we go back and review what we’ve done. Such milestones are 10, 18, 30, 40, 50, and 60.
We all have some goals and plans for ourselves and less or more try to achieve them. For each milestone we have different types of demands. For instance, at 30 we may be looking for education, job, and relationships, but at 40 we may be looking for family, kids, and their future; however, at 50 or 60 we may be looking for the same stuff that we had in our 20’s or 30’s, but for our children. The author has mentioned that each of these eras are like an stage of a game and if our achievements can’t satisfy us, then it’s like a Game Over because neither we can go back and change them, nor our age and new demands allow us to continue trying for the same goals. Therefore, if we don’t get them by that point, we’re failed and this brings sadness and a bad feeling.
Although 25 is not such a major milestone, it’s an important point when you leave the first half of the youth with some characteristics and become mature in some aspects. There are some teenager-like behaviors that you start to leave and some higher demands you start to have. You also learn to put closer goals to reality that are achievable for you in regards to your qualities and time.
I always hope that I don’t have the bad feeling of failure at abovementioned points especially at 30 that in my opinion seems to be the most important and sensitive milestone. To now, I’ve been satisfied with what I’ve done specifically when I consider my geographical location, the environment, and all the limitations imposed by the surrounding world, and contrasting it with the fact that my achievements were also very high that mark me as one of the special members of this society. I’m already at a point where many others like to be at, but just speak about it. Of course, no one is perfect and there were some parts that I could act better.
The most notable difference between my situation in the past 25 years and my current situation is that in the past, I mostly used to be stuck with classic stuff, the stuff like education or conscript that were coming to me one after one like they come to others, but this time I’m on my own to decide and feel some kind of freedom for myself.
Fortunately not only I earned good knowledge, expertise, and skills from the past, but also could get much experience from all the difficulties that I faced with, and I’m happy to say that I have more experiences than the average of the youth at my age, at least in Iran. This softens my path in the future and helps me make better decisions and achieve my goals.
Speaking of the difficulties that later helped me earn much experience, the conscript was one of them. Most likely you can remember that how difficult it was for me to pass my days during the service, but now it turns out to be an influential part of my life that indirectly helped me learn many things. Last year I celebrated by 24th birthday when I was very close to the end of the service, but now I’ve been able to adapt myself with the new life, and see things from a better perspective. When I compare myself with other people at my age, and see the huge differences between us, and the fact that I’m far ahead of most of them, I believe that after all, it was a positive yet an arduous part of my life specifically as it trained me in a relatively long time to work hard and resist.
But some good stuff happened in the past year in my life that I can share here. I completed the military service after 20 months, and since then have been recovering myself. It can be seen from my photos and the smile that is being expanded on my face! Besides, I could publish my fourth book that I co-authored with Simone for Wiley/Wrox and seems to be one of the best titles in this field. As I stated before, there is a high chance that I stop writing books for a few years and concentrate on other stuff. I used to be one of the youngest (even the youngest) author for this publisher as I wrote my first book at 22. I also had some resolutions for 2009 and luckily have had good progress with them. I could have more fun, gain a much better fitness by losing 22 pounds in less than two months and exercising, and fortunately, leaving some fancy noise on the web.
There isn’t much to say for this year except the fact that as always, some unfortunate events and issues outside my realm didn’t allow me to achieve everything that I had planned to achieve, but I hope I can overcome them in the future.
In the past couple of months I’ve been writing a blog post series about Visual Studio add-in and integration package to compare their structure, applications, and differences, and some related stuff. So far I’ve written five parts:
- An overview and historical perspective
- Technical structure of an add-in and its applications
- Technical structure of a Visual Studio integration package its applications
- Differences between add-ins and VSPackages
- How to choose between add-ins and VSPackages
In this sixth and last part I want to give a short overview of general steps to upgrade an add-in to an integration package and wrap the discussion up.
How to Upgrade an Add-In to an Integration Package
You’re not always going to build an extension from the scratch. You may have some older add-ins in hand that you’d like to upgrade to VSPackages in order to have a better integration and provide better features.
Generally, there isn’t a documented constant progress to upgrade an add-in to an integration package. You might expect to see a classic wizard like Visual Studio solution upgrade wizard or a multi-step process that can simply guide you to upgrade an add-in to a VSPackage, but there aren’t such options available. This upgrade process varies based on your existing add-in and its features as well as the VSPackage that you want to build and its features.
However, with a simple example and some theoretical discussions I just want to give you an idea on how to perform this upgrade task easier. There are some general guidelines that you need to consider when performing the upgrade.
Add-ins are associated with one or more commands in the IDE and in a similar mechanism VSPackages register some commands, too. For a VSPackage, each element is associated with one or more commands. When upgrading an add-in to a VSPackage, you need to move your logic to the appropriate events. This depends on your project. For instance, you may have an add-in that displays something as a Tool window. In this case you need to move the code logic to the command associated with the Tool window in your VSPackage. This is a common step in your upgrade process but in details it varies based on your project.
There are some visual user interface elements in the IDE that you may use for your add-ins. In this case, you need to find the appropriate element in the VSPackage and then move your Windows Forms and user controls to the VSPackage and apply them in the element.
Of course, VSPackages provide much more functionality, features, and elements than add-ins so you always are moving from a smaller space to a larger one and will not require all features of the VSPackages to get it to work.
In the below example I suppose that there is an add-in with some basic features that I’d like to upgrade to a VSPackage. This add-in simply shows a text message in the MessageBox when user triggers the command for the add-in. This may be via a manual call of the command or clicking on the Tools menu option. The main part of the source code of this add-in is presented below.
public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled)
{
handled = false;
if (executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault)
{
if (commandName == "SampleAddin.Connect.SampleAddin")
{
ShowMessage();
handled = true;
return;
}
}
}
private void ShowMessage()
{
MessageBox.Show("Visual Studio Extensibility");
}
Now suppose that I want to upgrade this add-in to a VSPackage. All I need to do is simply moving my code logic to VSPackage and bind it to the appropriate command. Of course, this is the most common scenario because many of the add-ins are built on topic of the commands.
When you’re creating a new VSPackage, Visual Studio opens a wizard and asks you to enter information for some commands that are associated with your command window or Tools menu option. You can use these commands to upgrade your add-in to an integration package.
Here I just add my logic to the MenuItemCallback method of the package. This method is called whenever you run the command for the menu item of your VSPackage whether manually or by clicking on the menu item. So in in the code below the MenuItemCallback simply implements the same logic for the VSPackage.
private void MenuItemCallback(object sender, EventArgs e)
{
IVsUIShell uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
Guid clsid = Guid.Empty;
int result;
MessageBox.Show("Visual Studio Extensibility");
}
Summary
This post series walked through something that heavily relies on developer’s experience and knowledge, and just tried to give some theoretical points and guidelines to help you understand the key characteristics, similarities, and differences between add-ins and VSPackages as well as when to use each, and how to upgrade an existing add-in to a VS integration package.
Although I gave some guidelines, your experience is a very important parameter to achieve everything covered in this series and it was just an attempt to give a better understanding of concepts and put you on the right way.
One common feature of any modern web application to improve its SEO and traffic is the use of sitemap as a standard XML derivation. I’ve been using such sitemaps on my blog for a very long time. I can remember the days when sitemap was an extension to Community Server written by the community, and the days when it became a built-in feature. I also had written a plug-in for Graffiti CMS to add sitemap to my blog.
However, for Behistun (my new ASP.NET MVC powered blog engine) I had to implement the sitemap with my own code. In ASP.NET WebForms the most common way to implement a sitemap is through an HttpHandler that handles the request to sitemap URL and generates the valid XML data of the sitemap in response.
For ASP.NET MVC and Behistun I used a different approach that replaces HttpModule and HttpHandler in many cases: Action Result. I implemented a custom action result that generates the sitemap as the output.
Looking around, I didn’t see such an implementation shared on the community even though it’s comparatively easy to implement it in ASP.NET MVC. So here I share my approach shortly hoping it helps some developers in the future.
Action result is a very nice and helpful part of ASP.NET MVC that can act as a extensibility point as well. There are various derivations of ActionResult base class available in ASP.NET MVC, and there are some interesting extensions such as the one written for RSS feed generation.
For my sitemap implementation in ASP.NET MVC I created my own SitemapActionResult class by inheriting from ActionResult base class, and used it to generate the sitemap based on the blog posts list.
First, assume that I have a Post class that represents a post with a very simple structure that I’ll use later in my example.
using System;
namespace SitemapActionResultSample.Models
{
public class Post
{
public int ID { get; set; }
public string Title { get; set; }
public string Body { get; set; }
public DateTime DateAdded { get; set; }
public DateTime UpdatedOn { get; set; }
public string Slug { get; set; }
}
}
Now I implement the custom action result for sitemap generation as follows.
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using System.Xml;
using SitemapActionResultSample.Models;
namespace SitemapActionResultSample.Components
{
public class SitemapActionResult : ActionResult
{
private List<Post> _posts;
public SitemapActionResult(List<Post> posts)
{
this._posts = posts;
}
public override void ExecuteResult(ControllerContext context)
{
context.HttpContext.Response.ContentType = "application/rss+xml";
using (XmlWriter writer = XmlWriter.Create(context.HttpContext.Response.Output))
{
writer.WriteStartElement("urlset", "http://www.sitemaps.org/schemas/sitemap/0.9");
writer.WriteStartElement("url");
writer.WriteElementString("loc", "http://site.com");
writer.WriteElementString("lastmod", DateTime.Now.ToString("yyyy-MM-dd"));
writer.WriteElementString("changefreq", "daily");
writer.WriteElementString("priority", "1.0");
writer.WriteEndElement();
foreach (Post post in this._posts)
{
writer.WriteStartElement("url");
writer.WriteElementString("loc", string.Format("http://site.com/{0}", post.Slug));
writer.WriteElementString("lastmod", post.UpdatedOn.ToString("yyyy-MM-dd"));
writer.WriteElementString("changefreq", "daily");
writer.WriteElementString("priority", "0.5");
writer.WriteEndElement();
}
writer.WriteEndElement();
writer.Flush();
writer.Close();
}
}
}
}
The code is straightforward. The SitemapActionResult gets a list of posts via its public constructor and applies some XML operations to iterate through the list of posts and generate the appropriate and valid XML output in the response.
To test this in action, I create a controller with a single action method to generate a few fake posts and pass them to the SitemapActionResult and generate the sitemap.
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using SitemapActionResultSample.Components;
using SitemapActionResultSample.Models;
namespace SitemapActionResultSample.Controllers
{
public class SitemapController : Controller
{
public SitemapActionResult Index()
{
List<Post> posts = new List<Post>();
posts.Add(new Post()
{
ID = 1,
Title = "First Post",
Body = "Body for the first post.",
Slug = "first-post",
DateAdded = DateTime.Parse("October 4, 2009 7:02 AM"),
UpdatedOn = DateTime.Parse("October 4, 2009 7:02 AM")
});
posts.Add(new Post()
{
ID = 2,
Title = "Second Post",
Body = "Body for the second post.",
Slug = "second-post",
DateAdded = DateTime.Parse("October 5, 2009 1:48 PM"),
UpdatedOn = DateTime.Parse("October 6, 2009 6:36 AM")
});
posts.Add(new Post()
{
ID = 3,
Title = "Third Post",
Body = "Body for the third post.",
Slug = "third-post",
DateAdded = DateTime.Parse("October 6, 2009 11:20 AM"),
UpdatedOn = DateTime.Parse("October 6, 2009 11:20 AM")
});
return new SitemapActionResult(posts);
}
}
}
And I add a route to my routes collection to map incoming requests to the sitemap URL to this controller.
using System.Web.Mvc;
using System.Web.Routing;
namespace SitemapActionResultSample
{
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Sitemap",
"sitemap",
new { controller = "Sitemap", action = "Index" }
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
}
}
}
This generates something like the below output.

The sample code for this post is available for download here.
In the first three parts of my post series about two major extensibility options in Visual Studio, add-in and integration package, I gave an introduction, discussed the technical structure of an add-in with its applications, and talked about the integrated package and its applications as well.
In this fourth part I’m going to cover the differences between an add-in and an integration package, and highlight these points that are a vital part of making your decision to choose one of them to implement your extensions.
Differences Between Add-ins and VSPackages
From this point, we can move to the main topic of this series about the differences between add-ins and VSPackages.
Previous parts gave you some basic information about add-ins and VSPackages. Many of the differences between add-ins and VSPackages can be discovered from these definitions and information.
API Access
The first and obvious difference between add-ins and VSPackages is in the way that add-ins use higher level APIs while VSPackages use lower level APIs. This is a very important difference.
Add-in has access to the APIs that are designed specifically for the extensibility and the automation system (Development Tools Extensibility) so development of add-in is easier and faster than VSPackages. In turn these APIs are apparently limited in scope and do not provide all the functionality that you may need for some cases. Of course, there will be lots of the common scenarios considered to build these APIs but you’re not always dealing with common stuff.
VSPackages, on the other hand, have access to lower level APIs that are just the fundamental of Visual Studio, so they’re not limited in scope and you can freely work with them in order to build enterprise integrated features and extensions. Unlike add-ins, VSPackage development takes more effort because Visual Studio APIs are a little harder in comparison with the DTE APIs that add-ins use. The nice point to mention is that add-ins actually use VSPackage APIs themselves to simplify a common part of package API features.
Development Languages
There is also a difference in the development languages that you can use to build add-ins and VSPackages. Visual Studio has a built-in support to build add-ins with Visual C#, Visual Basic, Visual C++ / CLR and Visual C++ / ATL. To build VSPackages, you need to install Visual Studio SDK in order to enable project templates that work with Visual C++ or C#. Of course it’s possible to use other development languages but it needs a hard process of writing all code templates by hand and referencing appropriate APIs.
As you see, you can achieve add-in development faster, easier and with more options.
Level of Integration
One of the biggest differences between an add-in and a VSPackages is the level of integration that you can achieve with them.
Generally, you can have a much better integration with integration packages in comparison with add-ins. Whatever you do, add-ins are an external thing for Visual Studio while VSPackages are a completely integrated part of the IDE.
Of course, this integration level depends on several parameters and one of them is the effort that a developer puts into his or her work. For instance, a developer may put a good effort to write an excellent add-in that has a better integration than a VSPackage that is not written very well. So here development skills and effort are two important points as well.
Development Process
One of the other differences that both software vendors and developers would care about is the development process and cost of development for each option regarding all the other differences and features that they provide.
Sometimes you may not be sure between add-ins and VSPackages and knowing the development process/cost can help you decide to go with a faster and easier option.
Generally, the development process for add-in is easier than VSPackage for some common and very well-known reasons that we outline:
- Add-ins are optimized for common scenarios during the time while VSPackages are comparatively newer and don’t have such goals. So with add-ins you can achieve some common goals faster and easier.
- For VSPackage development you need to know more concepts and have a deeper knowledge in Visual Studio Extensibility while for add-ins you don’t need such an in-depth knowledge.
- The time of development process for add-ins is less than VSPackages, hence its cost. This is due to the abovementioned nature of add-ins that are easier to develop.
- Debugging, testing, and deployment of add-ins is easier than VSPackages as well.
Of course, again this is a general comparison for same levels of skills and experiences. Someone with better skills would be able to do things in less time than someone who lacks these skills.
As I had written before, Simone and I had planned to write a Refcard about ASP.NET MVC 1.0 for DZone to be published after our book and promote it. Therefore, we were in touch with Alvin Ashcraft and other DZone editors to get this Refcard done.
This Refcard, entitled Getting Started with ASP.NET MVC 1.0, is now published on DZone website and you can download the PDF copy for free.
Previously I had written about DZone Refcardz and the goals that they have to deliver a compact introduction to a software technology to readers. The emphasis is on key concepts, principles, and use of diagrams and tables to express the concepts.
Our Refcard about ASP.NET MVC 1.0 follows the same approach to give a quick overview to ASP.NET MVC 1.0.
After giving an introduction, this Refcard talks about the prerequisites of learning ASP.NET MVC and the installation process for ASP.NET MVC, then reviews the MVC pattern. After that, it follows with building a simple application and connects it to some fundamental concepts of ASP.NET MVC such as routing, model, controller, action method, model binder, view, and HTML helper. The last parts of the Refcard discuss T4 templates as a tool to generate text templates for ASP.NET MVC applications and the implementation of AJAX scenarios in ASP.NET MVC 1.0.
It’s tried to cover all the key concepts in ASP.NET MVC 1.0 in this short guide, and I think that it delivers all these topics very well.
Here I have to admit that almost all the work for this Refcard is done by Simone, and unfortunately I faced with some unexpected difficulties in personal life that didn’t let me keep my end, however, Simone was kind enough to include me in the final work, so I have to thank him here. This Refcard would be the last work that I’ve done with him for a while. We’ve worked on some open source projects as well as the book and this Refcard in the past few years and all these works were great experiences for me, and I hope that I can work with him in the feature on other projects. Also I’d like to use this opportunity to congratulate his upcoming birthday.
It was quite a long while that I had decided to migrate my blog from Graffiti CMS to a new engine, and today I finally completed this task.
There is a long story to tell about this process and my reasons to choose my own blog engine after over 4 years of using Telligent products (Community Server and Graffiti CMS), and I try to talk about them shortly in this post.
Why Migrate?
Old followers of my blog know that I’ve been using Telligent products since the beginning of this blog for a very long time. First I was using Community Server as a single-blog and then migrated to Graffiti CMS as a more appropriate option for my blogging style. I used to be an active community contributor to Telligent products, ran popular open source projects for both products, and praised both these products as they really deserved it at the time of being. I used to be a Community Server MVP and a prominent name in Graffiti CMS development, and could find great friends inside Telligent and via this company and its products. Many of my old readers had come here from my initial activities on this community and suddenly we became great friends.
However, as all of you already know, this economic crisis had a huge impact on the way that Telligent leadership were managing the company, and after many layoffs during the last year, they restricted the activity around their products. The main product that was negatively affected by this movement was Graffiti CMS. There has been a long time that Telligent hasn’t contributed any update to this product and this has been the source of many complaints by customers and community members recently.
Here I’d mention that Graffiti was a great product as was, and it’s still a thorough product for its own whether as a CMS or a blog engine. However, I don’t want to deviate from the main point of this post by talking about Telligent and its products, and why many of the community members including myself believe that Telligent had to drop new builds in the past months.
But the reason that convinced me to move off Graffiti and write my own engine was the fact that most likely I won’t have time to spend on maintaining the technical side of this blog in the next few years, and I thought that it’s better to have something simple and easy to maintain that I have full control on. Graffiti was written for ASP.NET 2.0 and IIS 6.0 and there was no source code available, so it could cause difficulties in the future to manage this product.
Destination Options
It’s a matter of a fact that after more than 4 years of blogging, I’ve realized that the type of a blog engine and the technology behind it are not a big deal whether you’re a technical developer or not. All an author wants is a tool to go, and almost all the current blogging engines are satisfactory in this matter specifically for me as a blogger who has stopped categorizing and tagging his posts. I really need a plain blog engine that works for me.
I had many destination options to use. I was very interested to use an engine powered by ASP.NET MVC, but neither Oxite nor AtomSite were what I wanted. Both these options add an extra complexity that doesn’t have any value for my needs.
There were also some great engines written by ASP.NET WebForms such as Subtext or BlogEngine.NET but less or more, they couldn’t satisfy my requirements, too.
Looking around, I was seriously going to migrate to a PHP option like MoveableType or WordPress, and even used Jon Sagara’s tool to export my posts, but somewhere in the middle of the process I disliked the quality of my imported posts in the destination engine. It was breaking all my URLs and couldn’t carry all the data that I had.
Why Write My Own Engine?
Having this in mind, I thought about writing my own blog engine. To be honest, I dislike writing blog engines as I think that world is saturated by various engines available out there. I’ve contributed to many open source projects but never wrote a blog engine myself because I don’t believe in its necessity. When there are many engines available, why should we start a new project, drop one or two releases, and then stop the project after a while to make difficulties for our users?
However, I was locked in the middle point of a process where I couldn’t satisfy my needs with any of the existing blog engines. My blog is old and there were over 1000 posts (mostly lengthy with source code samples) written by me with many feedback. It wasn’t easy to find something suitable for this amount of data and type of content. I was looking for a simple blog engine that can import my posts and maintain the huge number of incoming links to my blog that have become a reference for the community over the years.
Furthermore, it was a while that I wanted to use ASP.NET MVC to power my blog engine, and I had promised some of our book readers to build a blog engine similar to WroxBlog that I’ve written for Chapter 18 of the book that lets them learn about the backend part of the blog.
Therefore, I decided to write a simple blog engine for my own that meets my goals and doesn’t make things complex
What is Behistun?
After spending much time on finding an alternative, I started writing my simple blog engine and called it Behistun. Behistun is the name of an ancient UNESCO World Heritage Site near Kermanshah, Kurdistan (Iran) where I was born.
I wrote Behistun in 7-8 hours then spent 4 days to end up with this simple theme and wasted 7-8 days to move the images and other files of my old blog to a single location to make them consistent!
As you see, Behistun is pretty simple. It’s written with ASP.NET MVC 1.0 (C#) and applies SQL Server as its storage. I used LINQ to SQL to interact with the data storage that consists of four tables only. I also used WCF for some parts such as RSS feed generation and XML-RPC service hosting.
Behistun is as simple as following features that are all built for single-blog functionality.
- Post management
- Comment management
- Trackback and Pingback (the latter one is not enabled yet)
- Monthly archive
- MetaWeblogAPI
- Sitemap
- FeedBurner support
The first and foremost advantage of Behistun is its simplicity, but it’s also a cool engine as it’s built by ASP.NET MVC, generates neat URLs, and loads pretty fast!
In order to build Behistun I used some third party tools and components that I list here:
- Ninject
- RhinoMocks
- CKEditor
- Ryan Lanciaux’ HtmlHelper for Gravatar
- Eran Kampf’s RSS Feed Action Result.
There is only one minor issue to inject my XML-RPC services built with WCF that I’m working with Ninject team members to resolve.
The theme for this blog is a simple one as the engine is. I inspired some ideas in coloring and fonts from Posterous design.
Major Changes
During the migration process I applied some major changes in my blog:
- Now I’m using Google Custom Search as the search engine for my blog. The search engine for Graffiti was pretty slow for this number of posts, and I saw no point in reinventing the best wheel that is ever built for the search on the web!
- There is no excerpt for posts anymore. You see the full content of the posts in the homepage.
- There is no About or Contact page anymore. You see a short biography along with a few links in my sidebar that you can use to contact me (don’t forget that I’m not that type of guy who accepts any friends request on social networking sites).
- After a long while, I restored my monthly archive with tons of blog posts that shows the power and age of this blog!
- Once again I migrated my feed to FeedBurner! This time just to make you happy and let you laugh a lot!
Having these changes in look and feel and functionality, I’m also going to apply major changes in my blogging style in a smooth manner. You’ll be witnessing a transition from my current focus on Software Development and .NET-related stuff to other topics that I like them more than these.
New License
The very important change is that I changed the license of my blog to a copyleft GNU Free Documentation License. I’m a big advocate of openness in software (don’t look at my Microsofti face!), so I thought it’s worthwhile to open all the doors for anyone to use this resource of content about .NET and Software Development and spread the word. There are some content stealers that steal my posts every time I publish them, and there is nothing I can do. At least, I can help them do a legal job!
Behistun as a Public Project?
The short answer is no, not at the moment! As I said above, I don’t like to add something to this mess of blogging engines and stop supporting it after a while.
However, the good news is that at the moment I’m using an Alpha version of Behistun and once I complete working on the first version as a stable engine, I’ll publish it as a disclaimer project with a very open license, so anyone can adapt the code and use it with no support on my side.
Having this said, if I can find 1-2 contributors who are really interested to get Behistun and make it a public open source project, I’m ready to cooperate with them.
If you thought that our story with DZone and ASP.NET MVC was limited to the recently published Refcard, you were wrong, because there were more stuff to come out about us.
Yesterday, Alvin wrote a review of our book on DZone and highlighted the major topics of the book, and today he published an interview with Simone and me about ASP.NET MVC and the book to complement our trilogy on DZone about ASP.NET MVC.
In the book review Alvin has walked through the major topics discussed in our book and has highlighted the main concepts that you can learn from each part of the book. Luckily, Alvin is among the initial group of readers who have sent us their very positive feedback on the book.
In the interview that he had with Simone and me we discussed the ASP.NET MVC and our book. In this interview we answered to some questions about our own web development background, the current and future status of the ASP.NET MVC, and its usage in contrast to ASP.NET WebForms as well as some stuff about the book, our motivations to write it, and its target audience.
Here I have to thank Alvin for all these works and for his continuous activities on .NET Zone on DZone community that has enhanced this topic on the website significantly.
Speaking of initial feedback about our book, it’s worth saying that we have received excellent comments from our readers in less than a month after the publish date. Two major highlights are the great reviews done by Maarten Balliauw (on his blog) and Justin Etheredge (on Amazon) that both praise the quality of the content. I thank Maarten and Justin for these reviews, too.
Recently I started a new blog post series on Visual Studio Extensibility and two major options available in this technology known as add-in and Visual Studio integration package. So far I’ve written four parts covering the following topics:
- An overview and historical perspective
- Technical structure of an add-in and its applications
- Technical structure of a Visual Studio integration package its applications
- Differences between add-ins and VSPackages
Here in the fifth part I want to discuss one of the ultimate goals of my post series about choosing between add-in and integration package based on requirements.
When to Use an Add-in and When to Use a VSPackage?
One of the main things that I want to help you learn is choosing between add-ins and VSPackages when appropriate.
This, of course, requires you to have experience and knowledge. These are two extensibility points that help you a lot. More experience with add-ins and VSPackages and seeing more implementations and their applications as well as having a deeper knowledge in these two extensibility options can help you choose between them.
But there are some theoretical points that I can share with you to give you a good understanding and start point.
I first outline four questions that you can ask yourself before choosing between these options:
- Which features do I need to implement for the project?
- What are the APIs that I need to implement this project?
- How much of effort can I put into this project?
- What’s my expectation of the depth of integration for this project?
Good and clear answers to these questions can help you so much. Let’s dive deeper into these questions.
Which features do I need to implement for the project?
There are obviously some features that you want to include in your project. These features lead you to some requirements such the necessity of some APIs that will be covered in the next sections.
But first you need to have a complete list of features to include in your project. Sometimes you may require some features that can be implemented as a VSPackage only, and sometimes you may have features that can be implemented with add-ins and VSPackages both.
What are the APIs that I need to implement for this project?
Based on the first question, you can decide on which APIs do you need to implement for the project?
Some features can be implemented both with add-ins and VSPackages while some features can be implemented only with VSPackages. For instance, having the capability of copying the source code of a file from the IDE to clipboard with code highlighting can be achieved with add-ins and VSPackages (of course, add-ins are the best option in this case) because all you need is accessing to DTE APIs that are available in add-ins and VSPackages.
But in the opposite direction you may need to implement a custom designer for yourself like a designer to build user interfaces with SVG (Scalable Vector Graphic). In this case, add-ins can’t help you and you can only work with VSPackages.
Here there would be a question in your mind: what are the API limitations of add-ins and VSPackages? The answer is wider than something that can be covered in documents and relies on experience and knowledge. But in general, add-ins are heavily relied on some APIs that may not allow you to do much things in some circumstances. Of course, VSPackages have limitations, too, but limitations of VSPackages are really ignorable and we can say that there is almost no limitation for VSPackage. If there is any limitation for VSPackages then somehow you can ignore your project because there wouldn’t be any other way to achieve it. However, there is an online list of features available in Visual Studio integrated package that you can read to decide.
At this point you may find your answer because if you can’t implement your project as an add-in then you have no choice but VSPackage whether you can put this effort and time for the project or not!
How much of effort can I put into this project?
If you’re here then it means that you’re able to implement your project both as an add-in and as a VSPackage so decision has become a little harder. This rarely happens because 80% of times there is a clear difference based on your requirements that give you the answer in first two steps, but here you can ask yourself about the effort that you can put into the project.
VSPackages are harder to design, develop, deploy and maintain and you have to keep this in mind.
An add-in implementation costs less and takes less effort while a VSPackage implementation costs more and takes more effort. You have some limitations here so can prefer add-ins.
What’s my expectation of the depth of integration for this project?
And the last question: the level of integration! You may have passed all above questions to reach here. Here you can decide based on your expectation of the depth of integration. If you want a completely integrated extension, then Visual Studio integration package is much better than add-in.
Recently I started a new blog post series on Visual Studio Extensibility and two major options available in this technology known as add-in and Visual Studio integration package. So far I’ve written four parts covering the following topics:
- An overview and historical perspective
- Technical structure of an add-in and its applications
- Technical structure of a Visual Studio integration package its applications
- Differences between add-ins and VSPackages
Here in the fifth part I want to discuss one of the ultimate goals of my post series about choosing between add-in and integration package based on requirements.
When to Use an Add-in and When to Use a VSPackage?
One of the main things that I want to help you learn is choosing between add-ins and VSPackages when appropriate.
This, of course, requires you to have experience and knowledge. These are two extensibility points that help you a lot. More experience with add-ins and VSPackages and seeing more implementations and their applications as well as having a deeper knowledge in these two extensibility options can help you choose between them.
But there are some theoretical points that I can share with you to give you a good understanding and start point.
I first outline four questions that you can ask yourself before choosing between these options:
- Which features do I need to implement for the project?
- What are the APIs that I need to implement this project?
- How much of effort can I put into this project?
- What’s my expectation of the depth of integration for this project?
Good and clear answers to these questions can help you so much. Let’s dive deeper into these questions.
Which features do I need to implement for the project?
There are obviously some features that you want to include in your project. These features lead you to some requirements such the necessity of some APIs that will be covered in the next sections.
But first you need to have a complete list of features to include in your project. Sometimes you may require some features that can be implemented as a VSPackage only, and sometimes you may have features that can be implemented with add-ins and VSPackages both.
What are the APIs that I need to implement for this project?
Based on the first question, you can decide on which APIs do you need to implement for the project?
Some features can be implemented both with add-ins and VSPackages while some features can be implemented only with VSPackages. For instance, having the capability of copying the source code of a file from the IDE to clipboard with code highlighting can be achieved with add-ins and VSPackages (of course, add-ins are the best option in this case) because all you need is accessing to DTE APIs that are available in add-ins and VSPackages.
But in the opposite direction you may need to implement a custom designer for yourself like a designer to build user interfaces with SVG (Scalable Vector Graphic). In this case, add-ins can’t help you and you can only work with VSPackages.
Here there would be a question in your mind: what are the API limitations of add-ins and VSPackages? The answer is wider than something that can be covered in documents and relies on experience and knowledge. But in general, add-ins are heavily relied on some APIs that may not allow you to do much things in some circumstances. Of course, VSPackages have limitations, too, but limitations of VSPackages are really ignorable and we can say that there is almost no limitation for VSPackage. If there is any limitation for VSPackages then somehow you can ignore your project because there wouldn’t be any other way to achieve it. However, there is an online list of features available in Visual Studio integrated package that you can read to decide.
At this point you may find your answer because if you can’t implement your project as an add-in then you have no choice but VSPackage whether you can put this effort and time for the project or not!
How much of effort can I put into this project?
If you’re here then it means that you’re able to implement your project both as an add-in and as a VSPackage so decision has become a little harder. This rarely happens because 80% of times there is a clear difference based on your requirements that give you the answer in first two steps, but here you can ask yourself about the effort that you can put into the project.
VSPackages are harder to design, develop, deploy and maintain and you have to keep this in mind.
An add-in implementation costs less and takes less effort while a VSPackage implementation costs more and takes more effort. You have some limitations here so can prefer add-ins.
What’s my expectation of the depth of integration for this project?
And the last question: the level of integration! You may have passed all above questions to reach here. Here you can decide based on your expectation of the depth of integration. If you want a completely integrated extension, then Visual Studio integration package is much better than add-in.







