Tag Archives: MySQL

WordPress and Pow

Apple + WordPress = POW!

Here is my second take on running WordPress and WordPress Multisite locally on my Mac (first is here). I just discovered Pow; “Pow is a zero-config Rack server for Mac OS X. Have it serving your apps locally in under a minute”, and my first thought was “can I run WordPress on Pow?”.  Well, here’s how I did it (I’ll also show you how to install MySQL, PHP 5.4 and Ruby 1.93 on Mac OS X Mountain Lion):

View the step by step installation guide

Running WordPress locally on Mac OS X Lion, Mountain Lion and Mavericks

Apple and WordPressWant to run WordPress on OSX? I’ve wanted to do it for a long time and finally got a round to do it.

Multisite: See notes below if you plan to run a Network of WordPress (aka multisite) on your Mac.

New: Here’s an alternative, take a look at WordPress on Pow (includes a “how-to add MySQL, PHP5.4.9 and Ruby 1.9.3“)

Here’s how I did it

MyGeneration

MyGeneration: “MyGeneration is a Development Tool written in Microsoft .NET. MyGeneration generates code from templates by combining either JScript, VBScript, DotNetScript C#, or DotNetScript VB.NET with a powerful database meta-data API. MyGeneration is 100% FREE and supports Microsoft SQL, Oracle, IBM DB2, MySQL, PostgreSQL and Microsoft Access. MyGeneration can generate code for non-Microsoft operating systems. MyGeneration serves up meta-data from your DBMS system that you can access in your script files or templates to generate whatever you might need, including C# and VB.NET code, Stored Procedures, PHP, HTML and more.”

more …

Gentle.NET

Gentle.NET is an object persistence framework featuring a database-independent SQL factory, automatic SQL generation and object construction, a list class for managing 1:n and n:m relations, concurrency control, and DataView construction helpers.
Gentle.NET supports MS SQL Server, MS Access, Oracle, PostgreSQL (using the NPgSql provider included with Mono), MySQL (using the ByteFX data provider), Firebird and SQLite.

Sampel use:
[sourcecode language=’c#’]
[TableName]
public class User : Persistent
{
private int userId;
private string userName;

public User( int userId )
{
this.userId = userId;
if( userId != 0 ) // assume 0 is a non-identity for new objects
Broker.Refresh( this ); // retrieve the row and update properties
}

public User( string userName ) : this( 0, userName ) {}

public User( int userId, string userName )
{
this.userId = userId;
this.userName = userName;
}

[TableColumn(“UserId”), PrimaryKey(AutoGenerated=true)]
public int Id
{
get{ return userId; }
set{ userId = value; }
}

[TableColumn(NotNull=true)]
public string Name
{
get{ return userName; }
set{ userName = value; }
}
}

User ford = new User( “Ford Prefect” );
ford.Persist(); // save the new user and assign an id value
User prefect = new User( ford.Id ); // retrieve the existing user
[/sourcecode]

more …