a simple blog server application in c++, using a Json rest server

Apr 24, 2015 at 9:09 AM
Hi, i have to make this for one of the clients, but since i never have done this type of application before, i had to make this post.

Here are some specifications:

"Casablanca” JSON C++ library, you must download it using nuget extension.
https://casablanca.codeplex.com/
Web Server C++ library, download winx64 Vstudio 2013 binaries. v 3.3.3
http://www.webtoolkit.eu/wt/download
http://sourceforge.net/projects/witty/files/wt/3.3.3/
Requirements :
You should create a simple blog server application in C++, using a Json rest server,
and a client interface, to test your blog server.
Then publish your simple blog with server webtoolkit library.
Use MS SQL Server 2012 database.
The json rest server application should run as a windows service.
  1. Install as a service.(JSON server application)
  2. Configure.
  3. Create your server win32 service (windows service with casablanca)
  4. Create the Win32 client application (native desktop win32 with casablanca).
  5. Insert a simple blog and few posts, and add some comments.
  6. Publish your blog/site in the C++ Web Server (webtoolkit), this server should get the blog data
    from the win32 service.
  7. Record a wink video, running your C++ json windows service, client interface, and running the
    web server.
Several Database Tables including a Site table with its fields and values...

as well as JSON api endpoints requested:

Sites/Blogs, Get sites/blogs,Update site/blog,Add site/blog
Users/authors :Get users/user,update user,add user.
Post :Get posts by site,Add post,Update post
Comments :Get comments by post,Add comment,Update comment.

Win32 Client interface :
Application should contain the following windows/actions :
Site/Blog
● Grid List Blogs Manager
● Add a new Site/Blog
● Update a Site/Blog(all fields, except id field)
Post :
● Grid List Posts Manager
● Add a new Post (status field should be set to pending)
● Update a Post (all fields, except id field)
Comments :
● Grid List Comments Manager
● Add a new Comment (status field should be set to unapproved)
● Update a Comment ( only status field is updatable )
Web Server:Main Site/Blog page. (ie http://localhost:xx/Sites/SiteID) ● Main title will contain the Site Name.
● It will show all the posts(“publish” status) with his title, which belong to the site/blog with
a maximum of 50 characters.(ordering by modified field, newest at top)
● For every post, will have a link (in the post title) which will open the Post page, also must
appear the author and the modified date of the post.
Post Page.
● It will show the full post.
● It will show all the comments(“approved” status) which belong to the post. (ordering by
date field, newest at top)

● for every comment must appear the name of the author(user) and the date field value(US
format)..

I am not asking to do the whole project for me but, only to direct me in the right direction...

I have downloaded all the necessary links.

Should i first create a new project in visual studio 2013 , c++ win32 project?

Then install JSON C++ library in the new c++ project? And how to connect SQL server to this project ( not sure) ?

Should i install SQL server or what ? And of course i must create all the necessary tables with fields in them.

and how to connect blog/site in the C++ Web Server?

I am little confused with all of these?

Can anyone point me in the right direction, so i can at least get an idea about this project.

Thanks in advance, waiting for reply...
Coordinator
Apr 27, 2015 at 5:06 PM
Hi gennady46,

The C++ REST SDK is mainly for helping to connect to services and not so much for building a web server. For our http_client I recommend you start by following getting started tutorial. You can take a look here for some basic usage of the http_listener.

You are asking for a lot of help here. I can only really help if you have more specific questions or issues with the library.

Steve