Recent Posts and Articles
This quick tip will show how you can write a custom view for a custom controller action in Orchard that does not use the current theme, but that still retains the ability to use shapes, as well as zones, Script and Style helpers.
Orchard 1.6 RC was released last night and I encourage you to spend a few hours testing it using fresh installations and upgrades of your Orchard CMS Websites. This is a fairly critical version in that it runs on .NET Framework 4.5 and leverages ASP.NET MVC 4, ASP.NET Web API, MySQL and other technologies. I know a lot of Orchard Developers prefer to wait until 1.6 is released before downloading it, but it's more helpful to download and test the RC. Think of it as a RELEASE. We want to catch any bugs before Orchard 1.6 is released as opposed to coming out with a quick Orchard 1.6.1 maintenance release.
Our Orchard Scripting Extensions module what provides re-usable scripting services (and is implemented e.g. for PHP scripting) and what we reported on earlier just got a new feature: scripts are now content items.
What does this mean? You can now have versioned script content items and use them with all of the services. This way scripts have centralized editors and you can re-use scripts, e.g. in multiple actions.
Over the weekend Benedek and Zoltán (me) have worked hard on something very new: adding PHP scripting support for Orchard!
Thanks to the Phalanger project it's possible to compile PHP scripts to .NET assemblies as well as run PHP scripts dynamically by defining the script source at runtime. This comes with full interoperability between the two platforms: PHP scripts can use .NET types and objects can be passed between PHP and .NET. So you can use PHP to script a .NET application like Orchard. Did I mention how awesome this is?
With our two new modules, Orchard Scripting Extensions and Orchard Scripting Extensions: PHP we deliver a set of services to enable running scripts using Orchard services, hooked into Orchard's events. Features are:
- Extensible scripting services: basically with implementing a very simple interface (IScriptingRuntime) you can write your own scripting runtime and thus extend everything that we've already written (see e.g the action below).
- Scripting actions: with the new Script Execution action scripts can be run when an event in the Rules engine is raised. This way scripts can be run e.g. when a content item is published or even scheduled.
- Dashboard testbed: under the Scripting admin menu item you can try out your scripts by running them immediately. The testbed has a decent syntax-highlighted editor thanks to the awesome ACE editor.
- PHP view engine: with the PHP view engine you can have .php views; that means, you can have themes written in PHP!
At last, the Orchard Hungary Team made it's debut as presenters in Hungary too (after being successful a month ago in Los Angeles). Hosted by the university we study at (Óbuda University) Zoltán and I held a session of one and a half hour length on introducing Orchard to a small audience of 20 people (which is the double of what we expected to see).
See the photos taken during the presentation on our Facebook page!
A while ago I mentioned how Orchard 1.6 will be running ASP.NET MVC 4, ASP.NET Web API, and NHibernate 3. I have already covered ASP.NET Web API in more detail in one of my ASP.NET MVC 4 Tutorials, ASP.NET MVC 4 Web API Routes and ApiController, but I thought I would at least give Web API a quick shoutout with Orchard CMS. As with all things Orchard, Web API works exactly as you would expect and can take advantage of the various services and extensions that come with Orchard.
In Orchard 1.6, Orchard Websites can use MySQL as a database along with SQL Server, SQL Express, and SQL Server Compact (Sql CE). Orchard CMS Developers can easily find affordable web hosting that comes with MySQL, making Orchard a very attractive option to small businesses and developers more familiar with MySQL than SQL Server. As you will see in this Orchard Tutorial, using Orchard and MySQL is just as easy as using SQL Server.
On the second day of Orchard Harvest one of the hackathon groups explored the idea of using graph databases, specifically Neo4j, in Orchard. I followed up on the topic and researched on how graph databases can play along in an Orchard module.
You can see the progress from the discussion I've opened. I've searched for .NET graph databases but couldn't really find any up-to-date project, even .NET drivers for graph databases are scarce. Neo4j seemed indeed like the best way to explore further: it's a very popular graph database and exposes a RESTful API so other pieces of software can use it even when they don't run on Java like the Neo4j itself. Fortunately Tatham Oddie and his team developed Neo4jClient, a .NET wrapper that provides a nice interface to interact with Neo4j through its web services.
It turns out that using Neo4jClient from Orchard is quite simple.