7. December 2011




Composite C1 web content management system


Composite C1I have been recently busy with a couple of projects and had to decide on a new CMS framework to build them on. I had tried Umbraco in the past and found I had some issues with the installation and just never couldn't quite "get" it right away. I looked at Orchard after seeing it at MIX in Las Vegas and finally also tried Composite C1 from Denmark. I fell in love with the last one.

It is not so much the features that come with the framework, but more the freedom it gives you to write your code whichever way you want. You can use the provided XSLT extension or provide your own and use them as controls. If you prefer to write your controls in C# code, you can do that to and cll them exactly the same as you would the built-in XSLT functions. You can use it with existing masterpages, MVC or old-school ASP.NET. It is free and comes with a bucket of ready to go plug-ins. Some of these components are to be paid for, but very few of them. 

I understand that the choice of picking a CMS is based on requirements, technology, capabilities and finally personal preference, but this is one I would highly recommend.

Read more here:  http://www.composite.net/


by Miguel Moreno

Category: Programming | Tools | Tags: ,

17. March 2011




Hyperlink in RichTextBox

Today I learned that the default RichTextBox control does not handle hyperlinks out of the box. If you do want to have hyperlinks work, you need to do the following: 

  • DetectUrls property on the RichTextBox control is set to True

  • Open the Designer.cs file and find the generated code block for the RichTextBlock properties and handlers. Add the following line:
    this.myRichTextBox.LinkClicked +=
      new LinkClickedEventHandler (this.myRichTextBox_LinkClicked);
  • Add the eventhandler to the .cs file:
    private void myRichTextBox_LinkClicked(object sender, LinkClickedEventArgs e) {
      System.Diagnostics.Process.Start(e.LinkText);
    }

That is it...


by Miguel Moreno

Category: Programming | Tags: ,

6. March 2011




nopCommerce ASP.NET ecommerce platform

While researching options for a shopping cart module for an ASP.NET application, I came across several packages. Of course, I had already gone through the list of the popular players in this market: 

And there are lilkely several more. However, most of these listed carry a hefty price tag and the ones that don't just didn't feel like the right choice for the app I am developing, based on reviews of developers who have had to work with them.

However, one package, NopCommerce, impressed me out of the box: it is an open source e-commerce solution that is based on ASP.NET 4.0 and installs using Microsoft Web Platform Installer (in my case, on Arvixe Hosting). I was able to use it right away and the list of customizable features and options is vast.

The jury is still out until I play with it some more, but from my initial research, this is the one I will be using for this project. I have also found some goodlooking templates on http://www.n-theme.com/

Read more: http://www.nopcommerce.com/


by Miguel Moreno

Category: Programming | Tools | Tags:

12. February 2010




Silverlight Validation & Tootip Styles...

SSilverlight Validation Tooltip stylesilverlight 3 comes with built-in validation for many of the input controls. Setting them up is fairly easy and they are styled well enough that you could use them right out of the box.

If you would like to know how to set it up and also would like to customize the look and feel of the fields and validation message, this short tutorial will explain how to do just that. 

See more here: Silverlight Validation & Tootip Styles...


by Miguel Moreno

Category: Programming | Tags:

18. January 2010




Wavelength to Colors in Silverlight

IWavelength to Colors haven't done many experiments lately and thought I'd do a quick one I have been meaning to do for a while.

It is basically a slider that runs from 350nm to 780nm (visible spectrum) and displays (I think accurately) the resulting color and graphical wavelength.

I had done something failry identical in a Windows application several years back, but wanted to do it in Silverlight.

See it here: wavelength to colors.


by Miguel Moreno

Category: Programming | Tags:

27. September 2009




Another Silverlight Clock experiment...

Continue TimeI thought I had told myself I wouldn't do anymore watch or clock-related experiment. Well, maybe one more and this is it...!

In this case, I saw a YouTube movie showcasing a beautiful and elegant clock designed by Sander Mulder. The simple clock has a single arm, fragmented in three parts, representing the hours, minutes and seconds arm all correlated and pointing in the correct direction at any time. 

In this simple experiment I attempt to recreate the motion of the arms of this clock in Silverlight 3.

See the experiment here...


by Miguel Moreno

6. July 2009




Vacheron Constantin watch experiment..

This morning I ran across an article about some watches and there is one that caught my attention. It is a Vacheron Constatin Mercator America and it is a beautifaul watch. A bit pricey, but if I ever have $47.500 that I don't need, maybe I'll get it some day.

The hands of the clock represent what are called nautical dividers and are used by navigational officers to quickly determine distance on a maritime chart.

Here is my attempt at recreating the design of this watch in Silverlight: Vacheron Constantin Mercator America watch experiment.


by Miguel Moreno

Category: Programming | Tags:

27. June 2009




Web.Config inheritance tip...

web.config tipMainly writing this entry so I don't spend hours looking for a solution when I need it again, since I tend to forget rather quickly how exactly I solved a problem. In this case, I have a website that is ASP.NET 3.5 and a folder which contains a different .NET application. I understand that the web.config in the root of the site, will cascade down into the applications within by default. What if our application within uses different settings... how do we prevent the settings in the root to affect the child applications?

Well, I learned that this can be accomplished in two parts. First there is a somewhat undocumented trick to instruct IIS that we do not want the settings to be inherited by child applications. You will need to wrap your <system.web> tag in a new tag, named <location> with the attributes as shown below: 

<location path="." inheritInChildApplications="false" >
  <system.web>  
    [...]  
  </system.web>
</location>

Note that this will show a red squigly line in Visual Studio since the inheritInChildApplications attribute is unknown to VS. 

Now, this only seems to work with <system.web>...what if we need to do the same with, let's say the <configsections>...? Assume we are pointing to System.Web.Extension dll, version 3.5 in the root and we want to point to a version 1.1 in the childApplication? In that case, we cannot use the <location> trick mentioned above. Instead, we can to do a runtime binding redirect in the web.config of the childApplication as shown below: 

<configuration>
  [...]
  <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
              <assemblyIdentity name="System.Web.Extensions"
                                          publicKeyToken="31bf3856ad364e35"/>
              <bindingRedirect oldVersion="3.5.0.0"
                                       newVersion="1.0.61025.0"/>
          </dependentAssembly>
      </assemblyBinding>
  </runtime>
</configuration>

Enjoy!

by Miguel Moreno

15. March 2009




Silverlight 2.0 Moonlander game...

Silverlight MoonlanderA quick post here on an experiment that has taken way too long and maybe I have lost interest over time or it just became a bit more than a short experiment. In essence, it is a replica of the 1980's Moonlander arcade game.

I was shockingly surprised that Silverlight 2.0 does not have an obvious built-in HitTest or collision detection method for individual objects and the known workaround is quite clever, but somewhat less than elegant nor efficient, especially when checking many objects at the same time.   

I haven't really formed an opinion yet, since I may have overlooked features that are in the Silverlight 2.0 box and will post so, if I come across such feature. In any case, here is the game.

See it here...


by Miguel Moreno

Category: Programming | Tags:

22. January 2009




More free stuff from DevExpress...

DevexpressIn a previous post I had mentioned about 60 free .NET components available at no cost at all. These are high quality controls and I still have to try many of them. 

Well, looking for a Silverlight Datagrid, I came across Devexpress again and noticed they are offering these two compoent sets for free, including their source code. 

  • Silverlight Datagrid Control - here
  • Silverlight Menu - Toolbar controls - here

I used to love Xceed andComponentOne controls, but they are expensive and Devexpress has become one of my favourites since they make it nearly impossible not to try/use their components and become a fan of them...

I just thought I'd post this, because there aren't many Silverlight Datagrid controls and this one is free. I will likely be doing some experiments with these controls, as soon as I am done with another Silverlight experiment I am working on..


by Miguel Moreno

Category: Programming | Tools | Tags:

25. December 2008




Another Silverlight clock experiment...

ExperimentAnother attempt at yet another approach of representing time in an unusual manner. I saw this clock implemented in Flash and wondered what it would take to do this in Silverlight. Let's call it Mark II...

Here is my attempt... Again, as with many of these experiments, I thought I could make something work in a matter of a couple of hours and, especially this one, took me a bit more than that. I managed to consolidate a lot of the repetitive looping into one single method that moves all gears... 

See it for yourself here...


by Miguel Moreno

Category: Programming | Tags:

18. December 2008




Silverlight Error when adding objects

Silverlight Instance NameI have done a couple of Silverlight experiments where I programmatically generate objects on the fly and then attempt to add them to the Canvas. In one scenario, I was trying to generate 10 circles, give them some properties and then add them to the parent object, a Canvas, in this case.

However, when I did this, I got the following runtime error: "{System.ArgumentException: Value does not fall within the expected range." right when I try to add the instances to the parent (Children.Add()).

I wasn't able to find out exactly why this is happening, but after some digging, I figured that this happens because the newly created object instances have not been given a name and therefore the runtime cannot dynamically add two instances with the same name, or no names, for that matter...

So, to avoid this run time exception, all you have to do is to give your newly created instances a name, thus, in our case, simply add:  e.SetValue(Canvas.NameProperty, <name>); to your loop...

for (int i = 0; i < 10; i++)
{
   Ellipse e = new Ellipse();

   e.SetValue(Canvas.NameProperty, "e_" + i.ToString());

   e.Stroke    = new SolidColorBrush(...);
   e.Fill        = new SolidColorBrush(...);

   e.Width = 10;
   e.Height = 10;

   LayoutRoot.Children.Add(e);
}

Not sure whether this is the cause and the fix for this issue, but it seemed to fix it...


by Miguel Moreno

Category: Programming | Tags:

14. December 2008




Two more Silverlight 2.0 experiments...

ExperimentsI have been meaning to get some more Silverlight 2.0 experience under my fingertips and have taken a couple of Sunday mornings to acomplish a couple of experiments.

Nothing spectacular, but interesting nonetheless.

  • Silverlight Clock: emulating the concept of a fantastic animated clock I had seen done in Flash.

  • Silverlight Snow: Figuring that I would see so many ads, banners and logos with falling snow, I figured I ty my own approach. 

Stay tuned, as I will be working on more Silverlight experiments in the near future..

Read more...


by Miguel Moreno

Category: Programming | Tags:

20. November 2008




Added a couple of SharePoint Experiments...

SharePoint ExperimentsNot really experiments, but two brief articles I had been meaning to write for some time, simply to share some interesting approaches to developing Features for SharePoint:

  • A handy approach to automating your build process when writing a Feature: deactivation, uninstallation, unregistration, registration, installation, activation and recycling the application pool, all in one easy step.

  • Automatically extract data from an InfoPath form when uploaded to a SharePoint Form Library. Indispensable approach, especially when automating business processes or integrating non-homogenous enterprise applications.
Check them out here...

by Miguel Moreno

Category: Programming | Tags: ,

19. November 2008




Microsoft Silverlight 2.0 Progress...

Flash vs SilverlightAlthough it is undeniable that Silverlight has made quite an impact and, apparently been embraced without much resistance, it still has a long road ahead to catch up to its rival: Flash. As Scott Gu points out in his blog, more and more Rich Internet (and non-Internet as well) Applications are being written in Silverlight and the technology is becoming mainstream with the big names.

On the other hand, Flash has clearly the upper hand. More than 10 years in the business and a platform that can be embraced by non developers, gave them a long early start.

Just looking at the demand for developers in either realm on Monster.com gives you the picture:  Flash (2241) vs. Silverlight (178).

A few good articles comparing these two platforms can be found here, here, here and here.

So, as a developer familiar with both technologies, on which one would you concentrate...?


by Miguel Moreno

Category: Programming | Tags: ,

13. October 2008




Microsoft Releases Silverlight 2...

Silverlight 2.0"Microsoft Corp. today announced the availability of Silverlight 2, one of the industry’s most comprehensive and powerful solutions for the creation and delivery of applications and media experiences through a Web browser.

Silverlight 2 delivers a wide range of new features and tools that enable designers and developers to better collaborate while creating more accessible, more discoverable and more secure user experiences."

Read more: press release.


by Miguel Moreno

Category: Programming | Tags: ,

14. August 2008




Intellisense not working in Visual Studio...

"IntelliSense is Microsoft's implementation of autocompletion, best known for its use in the Microsoft Visual Studio integrated development environment. In addition to completing the symbol names the programmer is typing, IntelliSense serves as documentation and disambiguation for variable names, functions and methods using metadata-based reflection." (Wikipedia)

So, I can't quite remember when exactly Intellisense stopped working for me in Visual Studio 2008, but I know I have been without (automatic) Intellisense for quite a while.When typing a dot after an object or method, it used to just show up automatically... I could however have it come up by pressing <CTRL><SPACE> and eventually got in the habit of just doing that when I needed it, without attempting to find out exactly why it was broken in the first place...

So, several months later, I stumble upon an entry by Richard Fennell, who explains how to fix it. I thought I'd post it for when it breaks again, I know where to find the answer...

In Visual Studio 2008, select Tools > Options > Text Editor > All Languages. Ensure that the checkboxes in the Statement Completion section are actively checked (not grayed out).

That is it!. Click Ok and try it.


by Miguel Moreno

Category: Programming | Tags:

12. August 2008




Free license for 60 DevExpress controls...

DevExpressHere is an opportunity to take advantage of: DevExpress is offering single developer licenses for 60 of their controls free of charge – without royalties or distribution costs.

These are very high quality controls that should not be left out when considering any web (or windows) application development project. You see their ads in MSDN magazine every month and this is your chance to get them and use them without spending a cent.

"Once you register, you will be forwarded an Email with your login credentials to our product download portal. With this information in hand, you will be able to download and install all the controls and tools listed above free of charge. The applications you create with these controls can be distributed royalty free (see the EULA that accompanies the products for more information). Note that the installation you download will include evaluation versions of our entire product line. You can install these trials if you wish during the setup process. Visual Studio 2005 and Visual Studio 2008 are fully supported." (devexpress)

Read more: http://www.devexpress.com/...


by Miguel Moreno

Category: Programming | Tags: ,

12. August 2008




Optimizing tools for ASP.NET

We all know that you can ask for directions to the same destination multiple times and get different answers each time.

They will all lead you to your destination; however, some direction may get you there faster, some have a more scenic panorama, some with clear instructions and others are difficult to follow. 

The exact same is true for software development; each developer will write code their own way and have a reason as to why some function was written a certain way. However, with software, a key requirement is that we often don't want the elegance, the scenic nor the "pretty" code, but simply the code that executes efficiently, robustly and fast. How do you know if your code does exactly that...? You don't really know until you take your code for a test run and measure its performance...

There are a ton of tools out there that will assist in giving you a diagnosis of speed, performance, etc. 

Morgan at PHPVS.net has written a good article highlighting 9 essential tools that a developer ought to have to testrun their code and optimize it for deployment.

Read more: http://www.phpvs.net/2008/08/...


by Miguel Moreno

Category: Programming | Tools | Tags:

11. August 2008




Visual Studio 2008 and .NET 3.5 SP1 released

Visual Studio 2008Visual Studio Service Pack 1 and Microsoft .NET Framework 3.5 Service Pack 1 have been released today. The downloads are available here: 

"The .NET Framework 3.5 SP1 includes a lot of improvements and especially TONS (literally tons) of performance improvements for WPF applications, ADO.NET Entity Framework, ASP.NET Dynamic Data, ADO.NET Data Services Framework and much more…

PLEASE NOTE: If develop Silverlight apps with Visual Studio, please note that after installing Visual Studio 2008 SP1 you must update the Silverlight Tools (more info and download links are available here)." (via MSDN blogs - pblog)


by Miguel Moreno