Tags: | Categories: Blog Posted by admin on 2/21/2010 4:55 AM | Comments (8)


 

Orchard is an open source CMS web application that will allow you to create any website, page based or blog. We have been seeing many CMS in the market lately, this is a Microsoft open source solution that is intended be part of the Codeplex foundation.

Orchard have been build using ASP.NET MVC instead of ASP.NET Web forms, no a surprise there when Microsoft has been pushing their open source MVC as the way to create ASP.NET applications. 

You can find the Orchard Project here.

The features coming out in Orchard.

Even that now the Orchard Project is still very young, I can see potential, all the features they are going to add overlaps with the area of DNN, Word press and Graffiti.

I have been running Graffiti CMS for many years and I was looking in moving to Word press for the reach features, the main problem is that Word press runs in pho and mySQL. That blog engine has been growing in adopters by the masses leaving behind other blog engines in .NET. Is that why Microsoft created the Orchard project?

However if Orchard Project moves at the speed they have been moving, I can see running my blog soon with Orchard, leaving behind the fateful Graffiti CMS that now that became open source I feel I’ll be jumping ships before they can release the expected 2.0 version.

My experience downloading the source code for Orchard on February 18th.

Its important to note the date on a open source solution as the changes are happening everyday.

First screen just after compiling it and running the Orchard web app you’ll find that will ask you the customization of the CMS. All the configuration happens on the web application, you do not have to make any changes to the web.config.

image

Allow you to decide at start up about what database you want to store the application data. Your options are SQL Lite, SQL Server or SQL Express.

image 

The results looks like a new ASP.NET MVC simple application. I’m sure the first thing you want to do is to change the theme.

image

Problem changing themes in the latest release. Some images are still missing in the theme, I believe they are fixing that problem right now, so most probably that is being resolve when you read this post.

image 

Adding a new blog instead of pages, so in Orchard, you can just add pages to the engine or blogs. The Orchard theme looks really good.

image

Do not delete the Home page that comes in Orchard, you should be able to do it, but looks like your app won’t work at all if you do that.

Workaround, create a new page before deleting the home page and make it the main page.

So what is Orchard project missing? Well right now, many things really, still the project is pretty young and looks like there are many wished features that need to be added. The foundation has been set.

I don’t recommend to start using it just now for anything customer facing, great tool to download and learn the insides and outs or to learn ASP.NET MVC.

List of Things that there are a must for me.

  • A mobile theme; I would like to specify the theme when an iPhone, blackberry or other mobile device reads my blog.
  • Set Orchard on blog mode so I can personalize the Home page to show my blog posts.
  • Widgets; a way to add widgets and if I want write widgets to display on my blog.
  • Import and Export from other blog engines easily.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 2/17/2010 6:48 AM | Comments (2)


Now this post by the title already says is controversial or a hack, I take the second one, what that means is I’m recommending not to use the code in the post as anything plan to go close to production, this is just a little fun with code.

Most of the time, in ASP.NET you find yourself that when designing an application, you need to think about a Windows Service to complete a task without any user interaction. In the ASP.NET architecture, the user loads a page and code behind get executed, then results from the code will be display to the user. Now when the application needs to, for example, download the twitter public timeline, you cannot expect that you’ll have so many users to execute server side methods to do just that. When nobody is making requests, your ASP.NET application is not doing anything, how to make it do something?

So there is an state object in .NET called the Cache class. That class has a great delegate to expire the content stored in that object.

   1: public class MyDateTime
   2:     {
   3:         public DateTime datetime
   4:         { get; set; }
   5:  
   6:         public HttpContext context
   7:         { get; set; }
   8:     }
   9:  
  10:     public class MyCache
  11:     {
  12:         static List<MyDateTime> datetimeList = null;
  13:         static string cacheName = "test";
  14:         static CacheItemRemovedCallback onRemove = null;
  15:  
  16:         public static void InsertNewCache(HttpContext context, List<MyDateTime> oldDatetimeList)
  17:         {
  18:             // First time create the collection, otherwise retrive it.
  19:             if (oldDatetimeList != null)
  20:             {
  21:                 datetimeList = oldDatetimeList;
  22:             }
  23:             else if (context.Cache[cacheName] == null)
  24:                 datetimeList = new List<MyDateTime>();
  25:             else
  26:                 return;
  27:             
  28:             MyDateTime myItem = new MyDateTime()
  29:             {
  30:                 datetime = DateTime.Now,
  31:                 context = context
  32:             };
  33:  
  34:             datetimeList.Add(myItem);
  35:  
  36:             onRemove = new CacheItemRemovedCallback(RemovedCallback);
  37:  
  38:             DateTime dtExpiration = DateTime.UtcNow.AddSeconds(10);
  39:             
  40:             context.Cache.Add(cacheName,
  41:                                     datetimeList,
  42:                                     null,
  43:                                     dtExpiration,
  44:                                     System.Web.Caching.Cache.NoSlidingExpiration,
  45:                                     System.Web.Caching.CacheItemPriority.High,
  46:                                     onRemove);
  47:         }
  48:  
  49:         public static void RemovedCallback(String k, Object v, CacheItemRemovedReason r)
  50:         {
  51:             List<MyDateTime> retrievedCache = v as List<MyDateTime>;
  52:             InsertNewCache(retrievedCache[retrievedCache.Count-1].context, retrievedCache);
  53:         }
  54:     }

 

Create a webpage to call once to start the process.

   1: public partial class _Default : System.Web.UI.Page
   2:     {
   3:         protected void Page_Load(object sender, EventArgs e)
   4:         {
   5:             if (Cache["test"] != null)
   6:             {
   7:                 List<MyDateTime> dtList = Cache["test"] as List<MyDateTime>;
   8:                 foreach (MyDateTime dt in dtList)
   9:                 {
  10:                     Response.Write(dt.datetime.ToString() + "<BR/>");
  11:                 }
  12:             }
  13:             else
  14:             {
  15:                 MyCache.InsertNewCache(HttpContext.Current, null);
  16:             }
  17:         }
  18:     }

 

The results:

1:12:48 PM
1:13:00 PM
1:13:11 PM
1:13:40 PM
1:13:52 PM
1:14:15 PM
1:14:28 PM

Disclaimer: This is horrible code, this is to proof a concept, not to go live with anything to production with something like that, I just want to show, how the Cache object calls itself without a HttpContext and can run as long as IIS does not unload the Application Pool. As you can see the time is pretty variable, so there isn’t a warranty of the time span.

Now to keep IIS from unloading your application, you could on the CallBack event make a request to the application from within the application, not that will completely avoid that problem, yet will delay it.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 2/16/2010 7:26 PM | Comments (0)


 

Once again back to Seattle for the MVP Summit, this year is a pretty exciting one with all released they had. A few blurry pictures from the first day.

iq8g[1] 

John Papa and Tim Heuer

Me and Toby Richards, I actually look scare, just bad camera man ;-)

7ue[1]

At the end, great experience, tomorrow we are going to the campus to meet the product developers.

See you all tomorrow.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 2/12/2010 11:38 AM | Comments (1)


Finally this weekend I had time to work in the Map Stats to bring it to an useful tool.  It was overdue in a face lift.

MapStats is a simple script that when added to your website or blog, provides you with a Silverlight Map Control with the status and location of the people hitting your website by time.

I used ESRI technology and base maps. You can download the ArcGIS API for Microsoft Silverlight/WPF version 1.1 here.

 

image

  • Changed the map to Web Mercator Auxiliary 102100 to consume a great ArcGIS Online map
  • Added better symbology with a color ramp and animation
  • Added a slider when open full screen to see different times.
  • Upgraded to ESRI SDK for Silverlight 1.1.
  • Added a legend.

image

With the slider you can see the history of the requests, by default shows you all request of the last 3 days.

How to add MapStats to your website?

Just add the script below to your website you can change the Width and Height to fit anywhere in your website.

<script type="text/javascript" src="http://mapstats.net/Stats.ashx?Width=300&Height=200"></script>

 

You’ll be able to see the map and will start gathering information of the users hitting your page, by IP address will find the location and show them on the map.

How do I check the top websites with the Map installed?

You can check the website MapStats.NET for the number or geocoded IPs collected on your website.

If you press the button to see the Full Screen you then can interact with the map and see the tooltips as well as the legend. Being able to see the history of the requests to your website is very useful by just sliding the bar. If you want to see it running, just look to your right and down as you read this post, you’ll find the map, click the button to open it full screen and browse around.

Ok, I need ideas and feedback of where to go from here.

Cheers

Al

None of my opinions reflects opinions or views by my employer nor Microsoft. This is just my personal blog that is provided "AS IS" with no warranties and confer no rights. The postings on this site are my own and don’t necessarily represent ESRI’s positions, strategies or opinions.

Tags: | Categories: Blog Posted by admin on 2/11/2010 6:13 AM | Comments (0)


This fantastic walkthrough is for developers who need to build and deploy a server object extension for use in server applications. It describes the process of extending the MapServer to provide methods for performing a specific type of spatial analysis on the features in one layer of the map.  The scenario consists of four parts:

  • Developing the server object extension
  • Developing the ArcCatalog and ArcGIS Server Manager administration property pages for the server object extension
  • Registering the custom server object extension  
  • Developing a client application to work the server object extension

Read the whole complete tutorial here:

http://resources.esri.com/help/9.3/arcgisserver/adf/dotnet/developer/scenarios/extend_svr_object.htm

If you are thinking in extending ArcGIS Server, this is the best documentation I found that got me running.

You can actually get the sample here.

Even if the link says 9.3 it works in 9.3.1.

Cheers

Al

Related links.

Extending a ArcGIS Server geocoder.

Creating a Map Service Browser

Tags: | Categories: Blog Posted by admin on 2/9/2010 5:25 PM | Comments (0)


Always waiting until the official notice comes out before opening my mouth. Scott Guthrie just did that, Release candidate for Visual Studio 2010 and .NET 4 is out.

You can download the RC here if you are an MSDN subscriber. You’ll be able to chose from all the versions of VS2010 and .NET 4 (x86, 64bit)

I have downloaded and install and I have to say I didn’t see any problem installing with the existing Visual Studio 2008 and Silverlight 3. Still all my application are working fine, will let you know after a few more tests. Yet broke my Silverlight 4 application :-(

Happy coding.

Cheers

Al

PS. In the same token I needed the formula to generate the radius for tomorrows work, so I thought just to posted here as I keep forgetting it. Sorry

Tags: | Categories: Blog Posted by admin on 2/9/2010 5:04 PM | Comments (1)


 

I can only speak for myself in this one, I have seen other people master the balancing world of development without much ado, in my case, is being a lifetime of learning the way that works for me, hopefully my few tips can help you out or amused you to know that I’m still struggling in that battle.

The biggest problem for any developer is that is consumed by the project that works at every single time, developers like to put all their energy to deliver a complete solution using the framework and tools setup to accomplish that task. Saying that, is difficult to come up for air to see what’s around. The biggest sign you have that problem is that after working in a huge project, you realize how many things you have been missing.

Looks like every project always comes with a hard deadline, never seen any project without it, just finding the way to find any other time is an impossible mission.

In previous years I have been consumed by technology and getting that project to completion, now I find myself organizing myself better on the task at hand, being able to break down the tasks to small manageable pieces that will give me a better overview of the complete solution as well as the project deadline. I personally try to have more than one project at the same time, allows me to switch gears and pull myself out of not being consume by the project.

If you can, try to work in project with different tools and technologies, so if you have a ASP.NET project, try to get a dynamic language project consuming other kind of data. Will allow you to completely force you to think differently and not to confuse them. I have mistake before to different ASP.NET projects in C#!

Something really hard to do is to leave a task not completed, I wouldn’t recommend to add time schedules, I would stay on the task until is being completed before changing projects, that will allow you to start with a clean sheet. Not finishing a task for the lack of time, or because you are pushed to move to another project, will cause you distractions. Some developers get agitated when they don’t have the time to fix a bug or something is not working the way they would like.

Overextending yourself is normally what has happen to me, I never say no to a project really, when I get the chance to sit it out or dance, I always dance, probably my advice to myself should be, I need to learn when sitting that one out is the right choice.

I personally use the Windows 7 post notes that you can create for all my tasks, so I can always see them in the desktop, every single task will be added as a new note, I’ll reorganize them in the desktop by priority. Before Windows 7 notes I use actual post-its.

All and all, I keep myself interested by multiple projects, scheduling those are the hardest part, and in the overall schedule of work, family and my time for my pet projects is probably the hardest schedule of all. I guess at that point becomes priorities instead of scheduling. I wonder why I never finish any of my pet projects.

How do you keep your sanity as a developer when not all work is a workflow? I would like to hear from you and what do you use to organize yourself.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 2/8/2010 4:55 PM | Comments (3)


Feels like there are millions of conference that developers need to go every year. There is the MIX2010 that by the way Shawn Wildermuth will be presenting. If you haven’t been to one of his presentations, you are up for a treat, he is a Silverlight genius yet he can communicate it better than any one I know.

We have the big PDC in LA most of the time to bring developers to show what’s coming out. Those are expensive conference that get you out of the office to meet other developers in the same situation than you, yet, my question, are they really good for your career and knowledge? What do you really learn on those besides what’s coming out and how cool can you make something look with a good presentation?

My modest and personal opinion is those conferences won’t bring you anything you can substantially see, no now nor in the future. There are big shows by companies to serve some marketing schema. Its good for your boss to go, not for the developer. For developers we have the PDC Underground and the code camps. If you are asking yourself if I’m going to the PDC or the MIX, the answer is no, I didn’t go nor I’ll go to the PDC as well as I gave my sit at the MIX to my boss. Sad I’ll be missing the presentation about ASP.NET MVC 2.0 from Phil Haack.

Code camps is everything a developer needs, bring your computer and mingle with the experts presenting, asked them to help you out with your code, open your laptop and see them writing code with you. Let developers present for you and share your knowledge with them. In the same line with code camps, we have also the Summits, where developers also get together. I’m talking about the ESRI Developer Summit as well as the Microsoft MVP Summit.

For those 2, it will be my third year attending both. Both will have developers everywhere learning and sharing information, both will have presentations by developers learning new technologies and as the presentation happens, laptops and netbooks will be open to capture every single bit of code.

If is your first time at the MVP Summit these are a few tips for you that will help you make the best of.

  • Sign up with twitter and enable the geocode section, so you can use it and find people and presentations, the MVP Summit has many things happening at the same time and is important not to miss what you are looking for.
  • Ask your MVP Lead, has all the information and knows every single detail, if you are an ASP.NET MVP you know your lead will go an extra mile to make sure you get the information you need.
  • Find the rock starts, as you walk around the Summit, you’ll see familiar faces from blogs and conference, don’t be shy and introduce yourself, they are there to share as much as you are.
  • Find the underground meet up after the schedule, there are always meet ups for different technologies after the dinners, those are great times when wanting to talk geek.

I’ll be this year blogging almost real time, I’m not expecting to find lots of NDA presentations hopefully. Keep an eye on my twitter or the hashtag #mvp10 at Twitter.

Cheers

Al

Tags: | Categories: Blog Posted by admin on 2/7/2010 4:53 AM | Comments (1)


Many experts came out after the announcement disappointed by the iPad, after the big hype is understandable. Yet why Apple wants to follow a different formula that got them so successful? I went online to find a tool, now with a little browser you can really do lots of work. I used Google Trends to find out what people are looking for and interested. If you look at the graph below, the huge spike is people looking online or posting online information about the iPad. Compared to other devices, no other gadget had that spike until the Apple Tablet came to the announcement and stay up after as well.   

Blue : iPhone

Green BlackBerry

Yellow: Android

Red: iPad

Google Trend

 

For January only view to really see the spike.

 

The huge jump means how many people were looking the the device in January, even after the announcement.

The people has spoken, they are fascinated by the iPad, I’m expecting a huge amount of people lining up on Apple Stores to get those fresh devices of the shelves. Does people searching for that means curiosity? What other device ever had that curiosity on the web?

Cheers

Al

Tags: | Categories: Blog Posted by admin on 2/6/2010 5:14 AM | Comments (1)


The open source Graffiti CMS 1.3 project started a new trunk on the source control to make room to the effort for Graffiti CMS 2.0 development. Telligent’s Graffiti coordinator posted an announcement with ideas for Graffiti 2.0

Main new feature is moving away from the database layer to something more standard, on the post didn’t talk about a mobile theme to compete against other blog engines with those already build in.

The new renewed interest for Graffiti CMS is letting know developers that Telligent didn’t just open sourced that application to stop supporting it, the way Telligent is adding time coordinating the open source solution means that even when they are giving all that to the community, they are also believe that good applications should not die just because didn’t sell as good as they first predicted.

In my modest opinion, I believe that if the open source solution gets more attention and developers to help out on the 2.0 initiative, we could actually come up with a fantastic version to compete with any other CMS out there.

This is a project to keep an eye on it, and I’ll be upgrading my blog http://alpascual.com now running Graffiti CMS 1.3 to 2.0 when released. The important here is the timeline from the announcement to the release. Most people have a very short memory, if the projects gets on its way to migrate it to 2.0 with new shiny features with a simple release cycle, the open source solution has the chance to be counted among the blog engines out there.

If you decide to help, this are the steps. Download the source code one time or connect to the TFS server / subversion. Whatever you prefer.

Project Name: graffiticms

Subversion URL: https://graffiticms.svn.codeplex.com/svn

TFS Server URL: https://tfs02.codeplex.com

Source control client connection instructions

Read the announcement from Kevin at Telligent and sign up for a task.

Happy coding..

Cheers

Al