Web Development

Installing WordPress on Mac OS X Tiger

Posted on February 18, 2008. Filed under: Content Management, OSX, Software, Web Development | Tags: , , , , , , , , |

Of the many options out there, many people choose to run their own blogging software as opposed to a managed service like Blogger or TypePad. On the software side, there are many decent tools available, such as Six Apart’s Movable Type (we have a tutorial for installing MT as well). WordPress is another mature, capable and free blogging engine that is very popular with many bloggers (like its founding developer, Matt Mullenweg) and rapidly gaining in popularity across the Web. WordPress is an excellent choice for a personal or professional blog, and the price is right, too. This tutorial will show you how to install WordPress 1.5.1.3 on OS X 10.4 Tiger. (more…)

Read Full Post | Make a Comment ( 2 so far )

Installing Movable Type on Tiger

Posted on February 13, 2008. Filed under: Apache, Hosting, Leopard, OSX, Servers, Software, Web Development | Tags: , , , , , , , , |

One of the biggest phenomenons to hit the Internet in the past few years has been the personal weblog: blog for short. A blog is basically a Web site that allows its owner to post his thoughts, ideas and daily happenings. Some use it as a personal diary, some as a soapbox for their beliefs.

Note: This article is written for installing Movable Type on “Tiger” (Mac OS X 10.4.x). The Panther and older OS X versions of this article, have been relocated to their own seperate, permanent pages. (more…)

Read Full Post | Make a Comment ( 6 so far )

Leopard Server: Using ACLs with Open Directory

Posted on February 7, 2008. Filed under: Leopard, OSX, Servers, Software, Web Development | Tags: , , , |

In Leopard, Workgroup Manager supports rudimentary ACLs for the LDAP database. We’re all familiar with Access Control Lists by now. Especially in the Mac OS X Server community. However, we might not all be familiar with ACLs as they’re implemented in LDAP. But we should be, because LDAP is being used more and more as an address book, and with the new Directory application being shipped in Leopard it is conceivable that environments aren’t just going to use ACLs to secure LDAP but they’re also going to use them to allow users to self update their information in the directory. So in the interest of security and making the most out of the technologies build into LDAP, let’s cover LDAP ACLs for a bit. So to push beyond what you can do in Workgroup Manager, let’s take a look at building out more finely grained ACLs manually. (more…)

Read Full Post | Make a Comment ( None so far )

W3C HTML Validator on OS X

Posted on January 30, 2008. Filed under: Leopard, OSX, Software, Web Development | Tags: , , , , , |

Installing the W3C HTML Validator on Mac OS X

Building a website is a complicated process, and testing your finished product on every possible browser can be even more daunting. However, because modern browsers such as Safari, Mozilla, and Internet Explorer 6 are compliant with the World Wide Web Consortium’s (W3C) standards, testing your pages with the W3C Validation Tool is a great way to ensure that your pages work with modern browsers. The W3C Validator provides a line-by-line level of feedback, such as error information with references to the standards, on any URL you submit or HTML file you upload.

But what if your pages are accessible only within your firewall? Or what if your organization is reluctant to have their pages submitted to any external site for validation—even if it’s fully automated? (more…)

Read Full Post | Make a Comment ( 1 so far )

Installing MySQL on on Mac OS X

Posted on January 30, 2008. Filed under: Leopard, OSX, Servers, Software, Web Development | Tags: , , , , , , |

MySQL on Mac OS X

MySQL has become one of the most popular databases for Web applications. The database is well suited for common Web-related tasks like content management, and for implementing Web features like discussion boards and guestbooks. For a time, some developers avoided MySQL for commercial applications because it did not implement certain features, such as transactions. But this is no longer the case, and MySQL is a great choice for just about any Web-based application. (more…)

Read Full Post | Make a Comment ( None so far )

Setting up an OS X development server

Posted on January 29, 2008. Filed under: Apache, Hosting, Leopard, OSX, Servers, Software, Web Development | Tags: , , , , , |

Okay, so this was very much a case of fumbling around in the dark until stuff worked, lot’s of Googling and breaking stuff. The end result is a dev server on OS X that is running Textpattern with clean URLs and a copy of WordPress for good measure. These notes are primarily so I don’t forget how I did it, if they are useful to someone else, great! Be warned, though, I have no idea how secure this set up is and what flaws it has, so you follow these instructions at your own risk! Also, I am using OS 10.3.9 so I don’t know if this would work on Tiger. (more…)

Read Full Post | Make a Comment ( 1 so far )

Web Services With WebObjects

Posted on January 24, 2008. Filed under: Hosting, OSX, Software, Web Development, Xserve | Tags: , , , , , , |

Apple’s WebObjects is a comprehensive suite of tools and frameworks for quickly developing Java server applications. The release of WebObjects 5.2 allows developers to add standards-based web services to these applications, as well.

WebObjects gives you the ability to build or use web services without writing low-level SOAP, XML or WSDL documents. The WebObjects tools enable code-free generation, configuration and testing of web services from existing data assets. Because these web services can interoperate with clients written in many languages, including Java, AppleScript, and Perl, you can quickly create integrated solutions that would otherwise require a lot of coding.

This article shows you how to take an existing database and publish assets as web services, including a service description, all without writing any code.

Installation

If you don’t own your own copy of WebObjects 5.2, it is
available in a free trial version for Mac OS X version 10.2
or later at Apple
Developer Connection
. Directions on how to find the
download are on the
href=”http://www.apple.com/webobjects/getting_started.html”>

WebObjects – Getting Started page. We will be working
with Mac OS X 10.3 and Xcode so you will also need the Xcode
Tools for Mac OS X, available for download at the Apple
Developer Connection web site, in the Developer Tools
section. After you download everything, install the
WebObjects_X_Developer package in the Developer
folder and restart your system. You must upgrade to
WebObjects 5.2.2 via Software Update or you can get the
manual update at the page
href=”http://docs.info.apple.com/article.html?artnum=107649″
>About the WebObjects 5.2.2 Update.

If you don’t want to build the project by hand and just want to run it, you can download the example used in this article.

The Data Model

Installing WebObjects installs a sample database in addition to the WebObjects tools. Navigate to /Library/Frameworks/JavaRealEstate.framework/Resources/ and open the RealEstate.eomodeld file. This launches EOModeler and opens the model file of a ficticious real estate database of houses in Silicon Valley. EOModeler is used to reverse-engineer databases, automatically finding all tables, columns and relationships. At runtime the WebObjects persistence engine automatically maps and generates Java objects from JDBC databases. You don’t need to write any SQL code.

The image below shows the tables found in the real estate database on the left; however, EOModeler refers to them as entities. We’re going to work with two of them, Listing and ListingAddress. On the right are the attributes (columns) of a Listing. You may quit EOModeler. We don’t need it anymore.

Real Estate Model

Building the Server Application

The model can now be used to automatically generate a web services-enabled server application. First, launch Xcode, located in /Developer/Applications. Choose File > New Project. In the New Project Assistant, select Direct to Web Services Application. Name the project Houses. Accept the defaults until you see the Choose EOModels pane. Add the RealEstate.eomodeld model file at /Library/Frameworks/JavaRealEstate.framework/Resources. In the Build and Launch Project pane, deselect “Build and launch project now” and click Finish.

In the Xcode main window, click the triangle next to Resources. Select the Properties file and edit it so it looks like this:

WOAutoOpenInBrowser=false

WOPort=55555
Build and Run Click the Build and Run button in the Xcode toolbar to build and run the application. When you see the message Waiting for requests..., the WebObjects server application is running.

Everything should look like the image below:

Xcode

Configuring the Web Service

To customize a Direct to Web Services application you use the Web Services Assistant. It’s located in /Developer/Applications.

After you launch the Assistant, the Connect dialog appears. Enter http://localhost:55555 in the text input field and click Connect.

Most web services define a service with one or more operations, or methods. We’ll build a service HouseSearch and define an operation searchByPrice, which finds all house listings under a certain price. In addition to searching, WebObjects can generate Web service operations that let you insert, delete or update entries in a database.

In the Web Services Assistant main window, select http://localhost:55555 in the left-hand side list. Click the New Service toolbar button. Enter HouseSearch in the Service Name text field. Select Listing in the Available list of the Public Entities pane and add it by clicking the left-pointing arrow. Repeat for ListingAddress, making sure that the Enabled option is selected.

Now you add an operation to the HouseSearch Web service and define the calling arguments:

Click New Operation in the toolbar.

Enter searchByPrice in the Name text field.

Choose Listing from the Entity pop-up menu. Make sure the Type is search. Click OK.

In the main window, select askingPrice in the Available list in the Arguments pane and click the left-arrow button.

Choose “<=” from the Operator pop-up menu.

Select Return SOAP Struct.

Everything should look like the image below:

Web Services Assistant

Now, define the return values for this operation:

In the Return Values pane, select askingPrice from the Available list and click the left-arrow button.

Click the triangle next to address. Select address.street and click the left-arrow button. Repeat for address.city, address.state and address.zip.

Click the Save toolbar button.

You have now defined the HouseSearch service with the searchByPrice operation that finds all houses with an asking price less than or equal to its askingPrice argument and returns an array of listings, each with their asking price and address.

Everything should look like the image below:

Web Services Assistant

Testing the Service

Select searchByPrice under HouseSearch under http://localhost:55555.

Click the Test toolbar button. A test window is automatically generated with the appropriate user interface to test the searchByPrice operation.

Enter 250000 in the text input field and click Test. An empty list is returned. That is because a quarter of a million dollars won’t buy a home in Silicon Valley. Try again, entering 300000. This time three entries should be returned with their asking price and address.

See the image below:

Web Services Test

Generating WSDL Documents

Web Services Definition Language or WSDL is an XML format for describing web services and the operations they provide.

In the test window, click the WSDL tab. The WSDL document describing the HouseSearch Web service and its searchByPrice operation appears.

The WSDL document can also be retrieved directly from the server via the URL http://localhost:55555/cgi-bin/WebObjects/Houses.woa/ws/HouseSearch?wsdl. If you want to download the WSDL document and look at it, using the curl command is a convenient way to do so. In Terminal, execute the following command:

curl 'http://localhost:55555/cgi-bin/WebObjects/Houses.woa/ws/HouseSearch?wsdl' -o mywsdl.txt

Conclusion

You have developed, configured and tested a working Web
service with WebObjects without writing any SOAP, XML or
Java code. In addition, you learned how to obtain the WSDL
description that you can publish so client applications can
be built that use the service.

For more information about web services and WebObjects,
please refer to the manual titled “Web Services”
on the WebObjects Documentation site.

Editor’s note: WebObjects can do a lot more than web
services, including dynamic Web pages and distributed Java
Client applications. To find out more about WebObjects,
visit the
href=”http://www.apple.com/WebObjects/”>Web Objects page.

Read Full Post | Make a Comment ( 1 so far )

Web Hosting

Posted on January 22, 2008. Filed under: Apache, Hosting, Leopard, OSX, Web Development | Tags: , , , , , , , |

Web Hosting. Deploy anything from Apache to Zope.

You don’t need to be an experienced webmaster to host your own home page, website, or Web 2.0 application with Mac OS X Server. With its intuitive administrative interface, you can immediately start up a static website or deploy even the most sophisticated of sites.

Web Hosting

Powered by Apache.

Included in Mac OS X Server is Apache, the most widely used HTTP server on the Internet. Apache is preconfigured with default settings, so deployment is as simple as starting the Web service. Any HTML content saved to the server’s default web folder will be served over the Internet automatically. Mac OS X Server offers experienced webmasters support for using either Apache 2.2 or Apache 1.3 from within the Server Admin application.

Deploy the Web 2.0.

Everything you need to develop, deploy, and host reliable Web 2.0 applications is included. Mac OS X Server ships with a full complement of server applications and frameworks including Apache 2, Ruby on Rails, Tomcat 5, and WebObjects 5.4. For hosting enterprise-class applications, Mac OS X Server includes a 64-bit Java VM optimized for the latest generation of Intel multicore processors.

Hosting multiple websites.

Support for virtual hosting in Mac OS X Server allows you host multiple websites on a single server. Using Server Admin, you can configure each website on your server to have a different domain name (using virtual domains) and even a different IP address. In addition, each website can be configured with unique security options and separate log files for tracking and reporting.

Apache Performance

Up to 50% improvement over Tiger Server*

Leopard Server Xserve Quad Xeon

1.56x

Tiger Server Xserve Quad Xeon

Baseline

Apache performance

Java Icon

Be dynamic.

Apache is extremely flexible, so you can add dynamic content for a more interactive Internet solution. Dynamic content enables you to host stores, auctions, shared calendars, portal systems, polls, and other database-driven services. The robust server-side architecture in Apache supports dynamic content generated by server-side includes (SSIs), PHP, Perl, Apache modules, and custom CGIs — as well as by JavaServer Pages (JSPs) and Java Servlets.

Secure web services.

Mac OS X Server integrates OpenSSL with the Apache web server, providing support for strong 128-bit encryption and public key infrastructure (PKI) authentication using X.509 digital certificates. This high-grade security architecture protects credit card information and other confidential personal and business data transmitted during web transactions.

Read Full Post | Make a Comment ( 1 so far )

  • Blog Stats

    • 161,159 hits
  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 21 other subscribers

Liked it here?
Why not try sites on the blogroll...