Base4

Base4 is a Free (LGPL) application server for generating, sharing and re-using .NET data layers; this is intended to allow a development team to leverage existing enterprise systems and common functionality instead starting from scratch. It shares many similarities with WinFS but is significantly simpler because it doesn't need to be backward compatible with the whole of the Win32 API stack.

The latest version comes with a schema guesser to help new developers get started quickly. There is a video demonstrating this ability for setting up and writing in Base4 here.

## Contents

* 1 Features
* 1.1 Planned features: Version 3.0
* 2 Code examples
* 2.1 Connecting to a server
* 2.2 Requesting objects from a server
* 3 History
* 4 References
* 5 External links

## Features

* Server has an embedded website for Creating, Guessing, Managing and Registering schemas, with no need to learn XML syntax.
* Client/Server architecture allows many applications to act as a client of a Base4 Server at the same time, while centralizing common business logic. Business logic is bound typically to a schema and this is the primary unit of re-use in Base4. Each client application picks which schemas it needs to work with from those that the server makes available, and the server provides a central place which can enforce the business logic for that schema, independently of the client.
* Server now supports a new List<T>() query pattern in preparation for Language Integrated Query
* Allows you to define and generate a fully functional .NET data-layer by using the embedded website or, alternatively, by using the simple XML schema
* Support for inter-schema references to encourage data-layer sharing and re-use
* Support for schemas that wrap legacy databases
* Support for schemas that extend legacy databases
* Support for Object SQL-like queries and deep pre-loading of objects using what is called ObjectScoping
* Application Server supports add-ins to respond to lifecycle events (some examples are BeforeSave, AfterQuery, etc.)
* A core schema with built-in support for Files, Users, etc., and a framework for supporting Metadata promotion and demotion to and from files.
* All generated data-layers provide extensive support for XML including XML persistence, object Readers, and Object Writers that work directly with XML
* Automatic .NET Remoting configuration and custom type serialization management

### Planned features: Version 3.0

* Port from .NET Remoting to a completely REST based architecture
* Ability to load and save objects via a full URL, not just an object key relative to the current connection
* Ability to load and save individual object properties via a full URL, independent of their containing Object.

## Code examples

### Connecting to a server

using Base4.Storage;
StorageContext.SetDefault("tcp://Server:@localhost:999/default-store");

### Requesting objects from a server

See the examples here: https://web.archive.org/web/20070928040717/http://www.base4.net/quickstarts/quickstarts.aspx

FileBase file = StorageContext.FindOne<FileBase>("Name='My File'");
//Above: same as StorageContext.Default.FindOne( … )

if (file != null)

// ID is unique across all files.
file.Name = "Updated";
TextWriter writer = file.OpenWriter();
writer.Write("Hello World");
writer.Close();
file.Save();
//Above: Because the file has Base4 will update Version and Modified automatically for the file

User user = StorageContext.FindOne<User>("UserName='UserX'"); // Same as ItemContext.FindOne( ... )
if (user != null)

// User found do something.
// Do Work

## History

* Project Started by Alex James and software consulting team -2004
* Open Sourced -Feb 2005
* Development of Version2 targeting .Net 2.0 runtime and supporting generics -September 2005
* Entered Public Beta1 phase -March 2006
* Entered Public Beta2 phase -April 2006
* May CTP released - May 2006
* August CTP released - August 2006
* Version 2.1 released - October 2006

## References

## External links

*   * Base4 Blog

0.00

(0 votes)

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Base4&oldid=189539"