Giter VIP home page Giter VIP logo

marten's Introduction

Marten Postgresql as a Document Database and Event Store for .Net Applications

Join the chat at https://gitter.im/JasperFx/Marten Windows Build Status Nuget Package

Hey, we're just getting started, but there'll be stuff here soon. Check the issue list as quasi-roadmap and feel free to jump into the Gitter room linked above. See this blog post http://jeremydmiller.com/2015/10/21/postgresql-as-a-document-db-for-net-development/ for more information

Working with the Code

Like I said, it's way, way early and this should get smoother later. For now, you'll need to have access to a Postgresql 9.5 server and a database. After cloning the code, put a file named connection.txt at src/Marten.Testing that just needs to contain the connection string to the Postgresql database you want to use as a testbed. See the Npgsql documentation for more information about postgresql connection strings.

You will also need to enable the PLV8 extension inside of Postgresql for running Javascript stored procedures for the nascent projection support. See this link for pre-built binaries for PLV8 running on Windows. Just drop the folder structure from that download into your main Postgresql installation folder (c:\program files\postgresql\9.5 on my box). Once the binaries are copied in, run the command CREATE EXTENSION PLV8; in your Postgresql database. If you have any trouble with PLV8, please feel free to ask for help in the Gitter room.

Once you have the codebase and the connection.txt file, either:

  • Run the rake script
  • From a command line at the root of the codebase, run paket restore to fetch all the nuget dependencies

From there, open Visual Studio.Net or whatever editor you prefer and go to town.

Tooling

We're using xUnit and Shouldly for unit testing and paket for improved Nuget workflow. We're temporarily using rake for build automation, but it's not mandatory for development.

Mocha Specs

To run the mocha tests on the little bit of custom Javascript for Marten, you will also need some version of Node.js that at least supports arrow function syntax (I'm using Node.js 4.*). Use rake mocha or npm install once, then npm run test. There is also npm run tdd to run the mocha specifications in a watched mode with growl turned on.

Storyteller Specs

We're also using Storyteller for some of the very data intensive automated tests. To open the Storyteller editor, use the command rake open_st from the command line or rake storyeller to run the Storyteller specs. If you don't want to use rake, you can launch the Storyteller editor after compiling the solution by the command packages\storyteller\tools\st.exe open src/Marten.Testing.

Documentation

The documentation website for Marten is authored with Storyteller's documentation generation feature. The actual content is the markdown files in the /documentation directory directly under the project root. To quickly run the documentation website locally with auto-refresh (it's not perfect since it does rely on .Net's FileSystemWatcher), either use the rake task rake docs or there is a new batch script named run-docs.cmd.

If you wish to insert code samples to a documentation page from the tests, you'll need to wrap the code you wish to insert with // SAMPLE: name-of-sample and // ENDSAMPLE. Then to insert that code to the documentation, add <[sample:name-of-sample]>.

The content is kept in the main Marten GitHub repository, but the published documentation is done by running the publish-docs.cmd command and pushing the generated static HTML to the gh-pages branch of Marten.

marten's People

Contributors

barryhagan avatar bojanv91 avatar cocowalla avatar coreykaylor avatar danielmarbach avatar dpen2000 avatar ekulakov avatar ericgreenmix avatar gitter-badger avatar jarroda avatar jeffdoolittle avatar jenspettersson avatar jeremydmiller avatar jimgolfgti avatar jnevins-gcm avatar johannesrudolph avatar johncampionjr avatar jokokko avatar jvdvleuten avatar kamranayub avatar khalidabuhakmeh avatar lngr avatar mdissel avatar migajek avatar mysticmind avatar nieve avatar phillip-haydon avatar rob89 avatar scooletz avatar tim-cools avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.