9 Comments

screenshot_smallGrazeWP7 is a Windows Phone 7 app marketing site generator. It uses the Graze templating engine with Twitter Bootstrap to create static web sites.

GrazeWP7 uses a simple configuration file to generate a static web site for your application. The generated sited is pure HTML / CSS / JavaScript and can be hosted on any web server.

More details

More details about WP7Graze, including the quick start, are available from the project’s home.

Inspiration

The GrazeWP7 was inspired from the following projects:

It uses Windows Phone image assets from those projects.

369 Comments

Grazeis a simple static site generator. It takes a template and a configuration file and generates a static web site. The generated sited is pure HTML / CSS / JavaScript and can be hosted on any web server. The Graze templates are created using the Razor Syntax.

Getting started

  1. Download and extract the Graze. It comes with an example.
  2. Run graze.exe.

The static site (index.html) is generated into the “output” folder.

Graze templates

The Graze templates are created using the Razor.

<html>
<head>
    <title>@Model.Title</title>
</head>
<body>
    <h1>@Model.Description</h1>
</body>
</html>

Graze configuration

The configuration for Graze is done in XML.

<?xml version="1.0" encoding="utf-8" ?>
<site>
  <Title>Graze</Title>
  <Description>Graze: Static site generator using Razor</Description>
</site>

The configuration file represents the data which is injected to the generated static site.

Generating the static site

Once the Graze template and the configuration file are in place, the static site can be generated running the graze.exe. The static site is outputted to the output-folder.

Examples

The GrazeWP7 uses Graze to generate marketing sites for Windows Phone 7 applications.

screenshot_small

Features

Lists

Lists can be created in XML and accessed in the Graze template. Example XML:

  <Features>
    <Feature>Layouts defined using Razor syntax.</Feature>
    <Feature>Dynamic data models created in XML.</Feature>
    <Feature>Supports complex data models and arrays.</Feature>
    <Feature>Fast static site generation.</Feature>
    <Feature>Pure HTML / CSS / Javascript output. Host in Apache, IIS etc.</Feature>
  </Features>

Example template for accessing the list:

    <h2>Features:</h2>
    <ul>
        @foreach (var feature in Model.Features)
        {
            <li>@feature</li>
        }
    </ul>

Complex types

By default all the data in the XML is of type string when accessed from the template. But complex types can be created also:

<Link Url="https://github.com/mikoskinen/graze">Source code hosted in GitHub</Link>
<a href="@Model.Link.Url">@Model.Link.Link</a>

Case sensitive

The configuration is case sensitive.

Folder structure

Graze expects the following folder structure:

graze.exe
--template/
----configuration.xml
----index.cshtml
----assets

The assets folder is copied wholly to the output folder. The assets folder can include the CSS / JSS / image files required by the template.

License

Graze is available with the MIT-license. It uses the RazorEngine to generate the output.

Source code

Graze is hosted at GitHub.

1 Comments

I’ve just committed the first working version of Marketwatcher, a library for Windows Phone 7 which can be used to fetch application reviews from the Windows Phone Marketplace. It is available from the GitHub and it’s licensed with MIT, so you can use the library anyway you want.

Get the source code.

Get the compiled binaries.

Sample application

The Marketwatcher GitHub repository contains a sample app which can used to check out how the library is used.

Nuget

The Nuget package is coming!

Download

GitHub repository.

Binaries.

0 Comments

NSQLFormatter is a light-weight .NET-library for beautifying your SQL. NSQLFormatter is an open-source project, written with C# and .NET Framework 4.0. It is based 100% on the work done in the NHibernate-project.

Usage

1. Add reference to NSQLFormatter.dll.

2. var formattedSQL = NSQLFormatter.Formatter.Format(originalSQL);

No external references required.

NuGet

NSQLFormatter is available through the NuGet with the package name NSQLFormatter. Type “install-package NSQLFormatter” to install it.

Source code

Source code and the compiled binary is available from the following  GitHub-repository: https://github.com/mikoskinen/NSQLFormatter-dotnet

Background

NSQLFormatter was created when a project needed a way to easily beautify the inputted SQL. The excellent NHibernate-project (http://nhforge.org) contained the necessary code but adding the reference to NHibernate's dlls was deemed a too heavy-weight solution. So, the source code in question was copied from the NHibernate and all the requirements for external references (IESI Collections) were removed.

Licenses

NSQLFormatter is distributed under the terms of the FSF Lesser GNU Public License.

The project includes source code from the NHibernate-project, written by Fabio Maulo, Mike Doerfler, Sergej Košcejev, Ayende Rahien and others. Visit the NHibernate SVN-repository for more information: http://nhibernate.svn.sourceforge.net/viewvc/nhibernate/trunk/nhibernate/src/NHibernate/