Category Archives: code

Configure camel -openwebbeans – deltaspike to get a standalone camel application running with cdi

here are code snippet to get camel, OpenWebBeans container and deltaspike .

  • The code that boots the app
  org.apache.camel.cdi.Main maincdi = new org.apache.camel.cdi.Main(){};
  maincdi.run();
  • camel context producer
public class CamelContextFactory {

    @Produces
    @ApplicationScoped
    CamelContext customize() {
        DefaultCamelContext context = new DefaultCamelContext();
        context.setName("my-custom-camel-context");
        return context;
    }

    void cleanUp(@Disposes CamelContext context) {
        // ...
    }
}

Continue reading Configure camel -openwebbeans – deltaspike to get a standalone camel application running with cdi

PostgreSQL – new jsonb feature exploration – insert, query, index

In this post, I will explore the (not really new) postgreSQL jsonb feature as my objective is to compare nosql performance in real scenarii.

Prerequisite:
  • postgreSQL 9.4.4 installed (you can check by issuing the following : select version();)
  • pgAdmin installed
  • this runs on a HP probook 6560b
    • Processor Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    • 16 G of ram
Roadmap

Exploring GraphDB – Access Neo4J with .net driver (Create, Delete and Match)

Still on my path to

“what is GraphDB and what are its limitations… from the eyes of a developer”

I had to access it from code. I choose to do it in .net and first created a simple access library that I will surely evolve during my learning. (you can check it here : CExtensions-Cypher). I also created a feed for this on Myget : MyGet cextensions-cypher feed. As of this writing I used version 0.1.0-CI00001. (so early birds, be patient or contribute)

Note : You can also simply connect to Neo4j by just adding the package Neo4j.Driver.

If you want to use my library with VS2015, just add the feed in your Nuget Package Manager settings (Package sources) and add it to your project.
Continue reading Exploring GraphDB – Access Neo4J with .net driver (Create, Delete and Match)

Generate Poco classes from SqlServer or Oracle using CExtensions.EFModelGenerator

This post is about a new library CExtensions-EFModelGenerator for generating poco and dbcontext classes from Oracle or Sqlserver databases.
(support for other databases can be provided through customization).

with this library it could also be possible to generate code for java, javascript and other by implementing a custom Serializer (check the Test for mor info and more samples).

This post guides you through how to generate code from Sqlserver. (also check the Sample folder in the repo)
Continue reading Generate Poco classes from SqlServer or Oracle using CExtensions.EFModelGenerator

Implementing a Blog Engine using React and Redux

This post relates to the repository non-o.blog on github and this specific tag v.0.5.0.

This Blog Engine is using React to read files (posts, pages…) from a github repo. At this time it is using React as the view engine and Redux as the application state (store). to get the code, simply clone it on your mahine and checkout the tag v0.5.0.
Continue reading Implementing a Blog Engine using React and Redux

React environment with Webpack, Enzyme, Mocha and Karma

This is the first post describing the development of a new Blogging engine using React that I am building for fun. This first post describes the environment setup and add some more information on how to use these frameworks.

The code can be found here : https://github.com/non-o/nono-blog, and this post is mainly targeted to the v0.1.0 tag. so you can clone the repository and then checkout the v0.1.0 tag to follow. (or to get an inital setup for your project)

Continue reading React environment with Webpack, Enzyme, Mocha and Karma

Facebook Flux Pattern implementation in .Net (c#): Startup

(Code on Github : Flux.Net)

These days, I took some time to learn facebook’s React and like everyone, came across their Flux Pattern. if I can resume or take one sentence that seemed to be important is this idea:

Flux is used to have a more predictable system.

When looking at the pattern, and trying their Todo or Chat apps, it is not really clear where the call to the server occurs or at least it’s not yet standardized.(as far as I know).

Flux is stated to be a frontend framework, but wait, why would this pattern be more obvious as a frontend pattern.
Continue reading Facebook Flux Pattern implementation in .Net (c#): Startup