Posts in Category: Development

A New Beginning

i7MEDIA Takes the Helm

It is an exciting day for the mojoPortal project! First, allow me to introduce myself. My name is Joe Davis. I am the Founder and President of i7MEDIA and a longtime supporter of mojoPortal. On Friday, February 3, 2017, I and Joe Audette, Founder of mojoPortal, completed an agreement for the sale of mojoPortal to i7MEDIA. This sale includes the open source project and the commercial modules available on the mojoPortal website from Joe Audette's company, Source Tree Solutions.

I have been using mojoPortal since 2008 and supporting it since 2009. I started my business in 2008 and set out to find a good content management system I could use to build websites for my customers. After a lot of trial and error, I came across mojoPortal and I was immediately drawn to its ease-of-use and friendly forum, fostered by Joe Audette. After 9 years of building sites with mojoPortal, contributing to the core, and providing support to my own clients and those around the world through the forums, I am thrilled that I, and my company, are able to ensure the further development of mojoPortal.

Rest assured mojoPortal will remain open source and there are no plans to change that. We (i7MEDIA) do, however, have plans for expanding mojoPortal to help it stay relevant and to provide the best .NET CMS platform on the market today.

You're sure to be wondering what Joe Audette has to say about all of this. Well, he is very enthusiastic about the new life of mojoPortal:

It gives me great satisfaction to know that I have created something that so many people have found useful and that it will continue to be used and supported by a top community member and his organization. Joe Davis and i7MEDIA have always been the most qualified consultants for mojoPortal other than myself, and I've always had great confidence in referring customers and projects to them over the years. Joe Davis has been a good friend and has been my go to guy when I needed to refer a customer or project that I did not have the capacity for. Whether you need design help, hosting, or custom feature development, i7MEDIA is the team you want with years of experience. mojoPortal was my baby for over a decade, and my baby is in good hands! Long live mojoPortal!

Joe Audette, mojoPortal Founder

What's Changing?

Basic Stuff

At first, we're going to focus on changing small things that will save site owners and site builders time. Some of these items are:

  • Ensuring that settings are logically organized and labeled properly.
  • Removing unnecessary markup (empty divs, excessive <br> elements, etc…).
  • Consolidating DB scripts.

Developer Support

Development of add-ons for mojoPortal isn't necessarily hard but there is a bit of a learning curve and quite a few steps one must take to prepare a working development environment. Our focus will be on cutting down on the number of steps and making the process easier overall. We will also explore possible MVC and WebApi implementations of some features, especially administration features like the File Manager. 

Additionally, we want to engage with the developers already using mojoPortal to get them contributing code to the project. GitHub provides a very simple mechanism for generating pull requests so if you have code you would like to contribute, we would be very grateful.

Beautiful Design

It has always been possible to create beautiful sites with mojoPortal but the built-in skins were not good examples. We're fixing that and we're committed to making sure that mojoPortal is seen as a designer-friendly CMS. To make that happen, we're going to implement some new functionality which will allow UI developers to include options for site owners to control various aspects of their skin.

Documentation Audit

mojoPortal is a fairly well-documented system but there is a lot of stuff that is just not needed anymore, other things have changed, and there's a lot that isn't documented. 

Commercial Add-On Pricing and Licensing

We're working on the licensing and pricing for the commercial add-ons. Some of them are going to be released as open source and others will see their prices change. The server licenses are back and are generally at a lower price than before. To see the new pricing, take a look at the store (we've renamed the page "Add-Ons" because in the near future we're going to have a marketplace so others can sell or list their own add-ons).

Licensing has changed for all commercial add-ons with regard to updates. Now, each purchase of an add-on will give the purchaser a year of updates to that add-on. If you purchase Form Wizard Pro on February 5, 2017, you can continue to download updates to the module through February 5, 2018.

When's the Next Update?

We expect to release a new version in the next couple of weeks with several small fixes, a few clean bootstrap-based skins, and a brand-new file manager to replace both of the current file managers and the link and image picker used in the WYSIWYG editors. That's right, one file manager that does it all. 

We Need Your Help

We purchased mojoPortal and we're committed to it being a success, again. We will need your help to make this happen. If you would like to help with documentation, let us know. If you would like to contribute code, check out how easy it is to submit a pull request. If you would like to help others looking for help, subscribe to the forums.

Here's to the Future of mojo!

I am very excited about the future of mojoPortal. We soft-launched the mojoPortal website over this past weekend and I have already received a few inquiries about what's going on and some messages of support. Thank you for taking the time to read this post. If you have any questions, please feel free to ask them in the forums or send us an email.

Gravatar Joe Davis is the mojoPortal Project Lead and the President of i7MEDIA.

Improvements to the mojoPortal Visual Studio Projects and Solutions

Just a quick post to give a heads up to folks working with mojoPortal from the source code repository that the latest code in the repository has some significant improvements to the Visual Studio projects and solutions and I have updated some relevant documentation but wanted to bring it to your attention.

You can now use the Visual Studio Publish feature to package mojoPortal as described in the updated article Packaging and Deployment. I'm very happy about this because it has historically been one of those things that developers who are new to mojoPortal always stumbled with but prior to VS 2010 there was not an easy way to solve it. We've used the free UnleashIt tool to package mojoPortal since 2004 as we progressed from Visual Studio 2003 through VS 2005 and VS 2008, but improvements to Visual Studio 2010 and MsBuild made it possible to solve this problem easily so going forward will be able use Visual Studio 2010.

Also much nicer now for those who work with data layers other than MS SQL, you no longer have to change project references to use a different data layer. Now it is as easy as choosing the build configuration. I updated the old document "Setting the Data Layer in Visual Studio". I really love this since I'm always going back and forth working on different data layers.

screen shot of build configuration dropdown list

 

I think the out of the box experience with working with the source code in Visual Studio is significantly improved.

Follow us on twitter or become a fan on Facebook

follow us on twitter become a fan on facebook

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

SQL Server Compact 4.0 and mojoPortal

On June 30, 2010, Scott Guthrie blogged New Embedded Database Support with ASP.NET, announcing that SQL CE 4 (SQL Server Compact Edition) would soon be available. It was officially released as a public CTP (Community Technology Preview) on July 7, 2010 with an announcement on the SQL Server Compact Team blog in a post by Ambrish Mishra entitled Introducing SQL Server Compact 4.0, the Next Gen Embedded Database from Microsoft.

This little database is big news for mojoPortal

Today I am happy to announce a preview release of mojoPortal 2.3.4.7 for SQL CE 4 and ASP.NET 4.0. This package has a pre-configured database and can be deployed under Medium Trust with .NET 4 hosting.(*) This means it is easy to deploy and use even on budget shared hosting where Medium Trust security policy is almost always used. You can download the package mojoportal-2-3-4-7-preview-sqlce-net40-deploymentfiles.zip from the bottom of this page on Codeplex. It is an MsDeploy package, so it can be installed by importing it in IIS, or you can just unzip it and install manually.

When installing web applications like mojoPortal, often one of the more challenging installation issues is setting up the database, for non-techies this is the part that people really struggle with, and even people who consider themselves fairly tech savvy can find themselves struggling to get it working unless they have a background in working with databases and understand all the nuances of connection strings and permissions. Using SQL CE 4 eliminates this challenge completely because the database is just a file on disk. There is no database software to install on the server, so it does not depend on the host having it installed, it only requires .NET 4 hosting. Since we ship a database file already populated with initial data, it is basically zero configuration for the database, you don't have to do anything, it just works.

I'm sure some of you are aware that mojoPortal has supported Sqlite for a long time, and it is also a zero configuration, file based database that many people like a lot. However, it has never worked under Medium Trust and if your site traffic starts to grow there is not an easy way to migrate the data to a more robust database.

  SQL CE Sqlite
Zero config deployment yes yes
Backing up the files backs up the database yes yes
Works in Medium Trust yes no
A supported migration path to a more robust database yes to SQL Express/Server/SqlAzure no convenient migration solutions that I know of

 

Now, I'm not yet sure yet how easy the migration of mojoPortal from SQL CE to SQL Server will be. Scott Gu mentioned that they will be shipping migration tools that will make it straight forward to migrate the tables and data from SQL CE to SQL Express, SQL Server or SQL Azure. However, since SQL CE does not support stored procedures and we do use them in the SQL Server data layer for mojoPortal, it means we will also need to make migration scripts available to install the latest stored procedures into the database after migration. So, in theory, the migration process will be to first use the tool that Microsoft will ship to migrate the tables and data, then run the scripts we will make available that contain the stored procedures for a given version of mojoPortal, then you would just deploy the mojoPortal version for SQL Server over your existing mojoPortal for SQL CE installation and set your connection string for the new database. Once the migration tools ship I will verify the process and create documentation with the migration steps.

In summary, I think that the SQL CE package for mojoPortal will make it easy for you to stand up impressive new web sites quickly and easily in budget hosting with the possibility to upscale to a more robust database platform later without too much difficulty. I would say that if you are putting up a site that you are expecting to grow traffic quickly, then you should probably just start out using SQL Express, SQL Server, or SQL Azure. But, how many sites that you put online for your customers really get a lot of traffic? If the answer is not many, then you may find SQL CE is the best choice for many of your projects, reducing costs and time to deployment.

Screen shot of mojoportal system information showing SQL CE

 

Top Secret Early Access! :-D

 
Now you may wonder how I managed to have a version of mojoPortal for SQL CE ready so soon after SQL CE 4 was released. The answer is that I had early access to SQL CE 4.0 and access to a bunch of good folks on the IIS and SQL Server teams to help me with guidance and questions and was also able to give them feedback while they were working on this release.
 
Back in early March I was contacted by Jonathan Hawkins of Microsoft and was invited to an online meeting where they told me what they were planning for SQL CE and why it might be beneficial for mojoPortal to support it, I of course was very excited about it.  At the time the alpha bits of SQL CE 4 were not quite ready but I was provided with good help and work arounds that would enable me to work on support for SQL CE using the 3.5 version so I could get started without waiting. So I went ahead at that time and implemented it for the core mojoPortal features (it took me about a week) and managed to get it working as proof of concept. Once that was done I moved on to work on other things not knowing how long it would be until the alpha bits of SQL CE 4.0 would be ready. Finally on June 2nd I got an email that the alpha bits were available, but I was knee deep in other projects right at the time, so it was around June 27-28 when I finally tried the new bits and verified it worked under Medium Trust. Then when Scott Gu blogged about it on June 30, I realized it was going to be public very soon so I scrambled to complete the SQL CE data layer for the rest of the mojoPortal features (except for WebStore and my Add On Products). It took about 1 week to finish that work and by Friday July 9 I was ready to produce a package but decided to wait until Monday to blog about it.
 
So here we are, it is Monday, and I've uploaded the package on Codeplex, at the bottom of our current release. I've done sanity testing of all the features but not exhaustive testing of every configuration of every feature, so it is possible and perhaps likely there are still a few bugs here and there in the data layer, after all this is our newest data layer and therefore the least tested of all our data layers at this point. That is why I'm calling it a "Preview" release, and I hope you will give it a try and report any problems you may encounter. I will fix them quickly.
 
I'd like to thank all the folks at Microsoft for giving me this opportunity to work closely with them and get early access to the technology, and I especially thank Jonathan Hawkins, Parasuraman Narasimhan, Radhakrishnan Srikanth, Mohammad Imran Siddique, Himadri Sarkar, and Ambrish Mishra for all their help. It has really been a great experience for me getting to work with these guys and do something with mojoPortal that fit well with cutting edge work these guys have done on SQL CE. I really think they have solved one of the long standing problems in ASP.NET web deployment. For low traffic sites or quick prototyping or proof of concept deployment, or just low budget web sites, this is really going to reduce friction and make it easy to put a site up in minutes. 
 

Technical Notes

 
It turned out well that I waited for SQL CE 4 before implementing all the mojoPortal features. When I implemented the core features I only had SQL CE 3.5 to work with so in places where I needed to select a page of data, I was having to use some awkward SQL syntax to make it work, it did work but it was difficult to read and write. One of the coolest new things in SQL CE 4.0 is the new syntax for selecting a page of data like this:
 
SELECT * FROM mp_GeoCountry ORDER BY Name OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;
 
It would be great if someday SQL Server supports an easier paging syntax, as it is still awkward to get a page of data efficiently in SQL Server, though it is a little easier than SQL CE 3.5 since SQL Server at least gives us stored procedures which provides a few additional strategies for getting a page of data. Anyway, you can guess I like this new syntax, it is much more convenient. Probably since I've worked with so many open source database platforms in mojoPortal, and have learned the major syntax differences between them, and really most of them have had easier ways to get a page of data than SQL Server for a long time, I'm glad to see something that makes a bit more sense. In a nutshell, MySql, PostgreSql, and Sqlite all support the LIMIT x OFFSET y syntax, Firebird has an interesting twist with SELECT FIRST x SKIP y, and SQL Server has always had the SELECT TOP (x) syntax but no equivalent to OFFSET, and this makes us have to jump through syntax hoops to get any efficient way to grab a page of data. So at the moment, in my view, SQL CE 4 has at least one cool syntax thing better than its big brother SQL Server even if it is not as capable in handling large traffic.
 

The mojoPortal Query Tool can talk to SQL CE

The above screen shot shows that the built in mojoPortal query tool can be used with SQL CE.

No need to install it in the GAC

One of the interesting things to me is that it seems like SQL CE 4 must be all managed code, that is, I think it must be implemented purely in .NET. The reasons I think this is because it seems that the database engine must be completely contained in System.Data.SqlServerCe.dll, and this dll just needs to be in the /bin folder, it doesn't even need to be installed in the GAC (Global Assembly Cache). The main reason why Sqlite doesn't work under Medium Trust is because it does some P/Invoke against a native dll written in C. To be allowed to do that the managed dll for Sqlite would have to be installed in the GAC. Since SQL CE can work without being installed in the GAC, I can guess it does not do any P/Invoke and is all managed code. Someone asked about this in the comments of Scott Gu's post, and while he did not specifically answer it, he did mention in comments that they are looking at enabling use of SQL CE in Silverlight which I think lends more evidence to it being fully managed code. I could be wrong though, possibly there are changes in code access security in .NET 4 that makes it possible to use without installing in the GAC.

The idea of being able to use SQL CE as a client side database in Silverlight is pretty compelling to me, so I'll be keeping my eyes open for future announcements. I had once done a proof of concept where I managed to use Sqlite as a client side database in Silverlight via Google Gears, but it had a few issues because database calls had to be marshalled back and forth from javascript to Silverlight via the Html Bridge. It would be much nicer to be able to use SQL CE directly from Silverlight. That would enable some really interesting client side scenarios.

(*) Actually I think SQL CE 4 could probably be used under 3.5 .NET but not under Medium Trust, it requires .NET 4 to work under Medium Trust, and the mojoPortal package for SQL CE is only going to be available for .NET 4.

Consolidation of Data Layers

At the moment we have a separate data layer for SqlAzure, SQL Server, and SQL CE. Back in March when I first began work on SQL CE support in mojoPortal, I blogged Anyone Still Using SQL 2000?, to guage how many people still use it. Going forward we are dropping support for SQL 2000 and then the MS SQL data layer will be modified to make it compatible with SqlAzure, and then we will eliminate the separate data layer for SqlAzure. I "think" the previous release of mojoPortal 2.3.4.5 was still compatible with SQL 2000, but the latest code in the repository is not compatible because we have changed from ntext to nvarchar(max) which is not supported in SQL 2000. So the next release of mojoPortal for sure will not be compatible with SQL 2000. Going forward we will support SQL 2005/2008/SqlAzure and SQL CE.

Follow us on twitter or become a fan on Facebook

follow us on twitter become a fan on facebook

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

The Miraculous Resurrection of Novell Forge svn and the Recovery of Source Code History

If you read this blog on a regular basis you may recall that back on May 12 I blogged Caught Off Guard Novell Forge svn is Gone!

I had missed the email and had not known that Novell Forge was going away as of March 2010. So as it was, the Novell Forge svn server had already been running way past the deadline when I found it was down on May 11 and 12. That morning I googled and found the notice about it. So we quickly moved to Codeplex with a new Mercurial repository which I have since found to be a joy to use. Ultimately I felt the whole situation had been a blessing in disguise because I like Mecurial so much better than Subversion.

Then a few weeks later on June 6, a surprising thing happened, there was a post in the forums where a user said he just got the latest version of the code from svn. As it turned out, the svn repository at Novell Forge was back online!

So the next morning I did some research and found this post and this linked post about how to get svn history into Mercurial. It seemed pretty straightforward so I kicked the process off wondering if it would really work given we have history in the svn repository going back to 2005. The process started working, it scanned the repository and started counting down from 6000 plus change sets that I guess it was converting to Mercurial change sets. So that was the morning of June 7, 2010 and it finally finished running this morning sometime before I got up. Today is June 28 so it ran for about 21 days. The conversion process was surprisingly robust in that a few nights (including the screen shot below where it was getting close to finishing) it would lose its connection with the server and stop running, but I would kick it off again and it would scan and then pick up where it left off. The process was killed one night because my computer went into hibernate mode an would not wake up without powering it off, and another night a forced reboot by windows update killed it, but every time it managed to work again and pick up where it left off.

hg convert screen shot

So now I have the ability to browse change history going back to the beginning of our svn repository using TortoiseHG with a Mercurial repository on my local machine.

TortoiseHG repository browser

I'm kind of glad we started with just the latest code in a clean repository at Codeplex because this much history takes up a lot of space on disk, but now it is nice that I will be able to have an archive the source code history on CD ROM.

I have to say that I am pleasantly amazed with Mercurial and TortoiseHG!

Anyway, thought I would share the happy ending!

 

Follow us on twitter or become a fan on Facebook

follow us on twitter become a fan on facebook

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.

The .NET 4 Transition Plan for mojoPortal

This post will outline the transition plan for moving forward with .NET 4.0 in mojoPortal while still maintaining support for .NET 3.5 and how this plan will impact developers working with the mojoPortal source code.

Beginning with the coming release, we will be making a separate set of compiled deployment packages for .NET 3.5 and for .NET 4.  For those who are not working with the mojoPortal source code, you don't need to read the rest of the post, the only part you really need to know is that when you upgrade to the next and future versions of mojoPortal you need to choose the correct download package for your hosting environment. If you are hosted in 3.5 .NET you will need to choose the appropriate package for 3.5 and if you are hosted in .NET 4 you will want the package for .NET 4.

Transition Duration

We will continue to produce deployment packages for .NET 3.5 for at least the next year and possibly longer depending on community feedback.

What Changes Will Be Required?

The target framework is a project level setting, so we will be changing the 3 web UI projects (mojoPortal.Web.csproj, mojoPortal.Features.UI.csproj, and WebStore.UI.csproj) to have a target of .NET 4. To the extent possible we will try to keep the target for all other supporting projects as 3.5 during the transition period.

To make it possible to be able to produce a build for 3.5 .NET I have made copies of the above project files and named them as mojoPortal.Web.net35.csproj, mojoPortal.Features.UI.net35.csproj, and WebStore.UI.net35.csproj and I have set them up in a separate set of solution files.  

mojoportal.net35.sln is the complete solution configured for .NET 3.5.
mojoportal.core.net35.sln is just the core without all the features like blog, forums and WebStore etc.
mojoportal.mssqlonly.net35.sln is the full set of features but leaving out the data projects for alternate databases.

The main solutions which will be used for .NET 4 development have the same name except for the .net35 segment.

The new projects for .NET 3.5 are already available in the repository, but I have not yet changed the target on the main projects to 4.0, this will probably be done tomorrow. I did a test conversion on a copy already to make sure I will have no problems with the conversion.

We also have mojoportal.mono.sln which is for use in MonoDevelop on Linux.

screen shot of target framework setting

 

How Will This Impact Developers?

For some developers this will be great because they are wanting to use .NET 4 and the main solution and project files will be setup for .NET 4 development.

Developers who need to continue working with .NET 3.5 for their own custom features will need to remove the 4.0 version projects and add the new net35 projects in their custom solution files and then may need to re-create project references to the new projects since references may be lost when the projects are removed.

There will also be one other inconvenience for those who need to stay on .NET 3.5 development. When we convert the main Web project to .NET 4 it will change the Web.config file to be compatible with .NET 4 and it will no longer be compatible with .NET 3.5. I have created an alternate Web.net35.config file, so you will have to copy the contents of that file into the Web.config file after getting the code. To avoid merge conflicts when getting code updates from the Mercurial repository, you may also need to revert the Web.config file before getting updates from the repository and then change it back again afterwards. 

Since the 4.0 and 3.5 versions of the projects will share the same files, I have added a conditional compilation symbol NET35 on the 3.5 versions of the projects. So in code that uses new properties or methods available only in .NET 4 we will have to wrap the code with checks for the conditional symbol like this:

#if !NET35

// some .NET 4 specific code

#else

//some alternate .NET 3.5 code if needed

#endif

screen shot of conditional compilation symbols

This way when we compile the 3.5 versions it will leave out the 4.0 only stuff.

Of course this means that whenever I add a new file to one of the 4.0 projects I have to remember to also add the file in the 3.5 version of the project, so there will be some extra tedium for me also during this transition period. Once the transition period is over and we feel it is safe to drop support for .NET 3.5, then we will remove the extra project and solution files and we will then be able to change the target on all the projects in the solution to .NET 4. There may be a few bumps along the way in a transition such as this, it is similar to what we went through in the transition from 1.1 .NET to 2.0 back around 2005.

So that is the go forward plan that will allow us to begin using some .NET 4 features while maintaining the ability to produce builds for 3.5 .NET for at least the next year. If anyone has any concerns or opinions or other feedback about this plan, please post in the comments. The main projects will be converted to .NET 4 possibly as soon as tomorrow. If that worriess you, you might want to go ahead and get a fresh update from the repository today.

UPDATE 2010-05-24: I've completed the conversion of the main projects to 4.0 .NET in the repository and verified that it is still very easy to make a build for 3.5 .NET.

www.mojoportal.com has been running on .NET 4 for several days now and all seems well. I did encounter a few little menu rendering issues at first but was able to solve them in code (already updated in the repository). So far the only significant issue I've found is that under .NET 4 Medium Trust configuration we get errors on any page that has NeatUpload on it. I've passed the information about the error on to Dean Brettle, the developer of NeatUpload so hopefully it can be resolved soon. In the mean time I would not recommend using mojoPortal under .NET 4 with medium trust. It does works fine in Full Trust and hopefully the Medium Trust issue can be solved in the near future.

UPDATE 2010-05-25: Thanks to assistance from Dean Brettle, the latest version of mojoPortal in the repository now works with no errors under .NET 4 Medium Trust.

 

Follow us on twitter or become a fan on Facebook

follow us on twitter become a fan on facebook

Gravatar Joe Audette is the founder of the mojoPortal project and was the primary developer until February 2017.