Hacker News new | past | comments | ask | show | jobs | submit login
Silicon C++14 Web Framework Documentation (siliconframework.org)
49 points by matt42 on Feb 16, 2015 | hide | past | favorite | 28 comments



Author here. If you have questions or suggestions, please post them here.


I always missed a good web framework in C++. I tried Wt, but didn't like its 'desktop app philosophy', so I dreamed of creating one.

Why I didn't do that? Because web framework must be feature rich. Rendering templates and maintaining sessions is no longer fun; today people expect the frameworks to solve their countless high-level problems, such as Paypal integration, i18n, currency manipulations, etc. Needless to mention that the code must be rock solid and well documented.

What's my point? I appreciate your effort, but I'm afraid you need some greater powers to be involved in development of features. Keeping fingers crossed for this to happen!


I agree with your point. We are still at a "prehistoric" age in the development of C++ web servers.

All those high level tasks where hard in C++98. But C++11 and C++14 really helps high level programming. Silicon demonstrates that web development is now as easy in C++14 than is javascript, php, ...

The community just need to realize it, and silicon proves it by building a core framework. It reaches the ease of programming of dynamic languages like javascript or php while keeping the advantages of C++: performance and compile time code verification.

Let's see how fast the community will adopt the framework and how the numer of middleware will grow...

Given all the money spend in optimizing dynamic languages like ruby, javascript, python, ... There is a lack of performance in common web application frameworks. Why not building from a high level language that is fast by design ? With C++14 and silicon, you can finally run you app without worrying about with VM/JIT will better optimize your program.


Fortunately, not everyone who programs for the web needs PayPal integration :) If it's easy enough for people to switch, it will get there.


Did you consider libuv? If so why asio over libuv. I've never taken time to benchmark them, but I have built web servers on both. Libuv has broader api support like cross platform file aio. Asio has more convenient c++ bindings, but there are some third party bindings that I haven't tried.


Async filesystem I/O isn't a priority for modern webapps / HTTP API endpoints that primarily just slam a database.

That said, I somewhat agree wrt ASIO. I've not quite been able to get ASIO to put out the reqs/sec, and the API is iffy in some areas, even when using C++14. Imho it's tolerable with the coroutine integration, but then debugging becomes a nightmare (forget exceptions because basically every socket operation can and will throw if the client does anything iffy)


I also think that with async/await probably coming with the next c++ standard, we will be able to write much simpler async code in plain C++, without Asio.


libuv could be one of the futur backends yes. But with microhttpd silicon is able to handle more req/s that most other web frameworks. I am more focused on stabilizing the code base, documentation, and adding support for other databases.


Does this framework include many routines for string manipulation, like splitting, joining, formatting and encoding conversion? These are essential to the web, but extremely lacking in C++.


Everything except encoding support is in boost. ICU has i10n support.


I never used a C++ web framework, how does this compare to the (few) other existing ones like Wt or crow?


Wt is more focused on providing Qt-like widget of building interfaces server side. Silicon does have any tool to build html pages. It lets the client do the rendering.

Crow is a more similar to silicon. But silicon has several advantages:

   - several backend (microhttpd, websockets)
   - sql middlewares and orm for sqlite and mysql
   - dependency injection
(ps: I have no experience with crow)


Would be awesome to have silicon support libh2o as a backend; github.com/h2o/h2o

Although libmicrohttpd is a very solid first choice, I would love to see how a combination of silicon and libh2o with it's HTTP/2 engine performs.


Yes. I already started to read the examples. They are a bit hard to digest but I will definitely take the time to implement a libh2o backend with HTTP/2 support.


What's the reason for IOD still using Boost Regex?


This dependency will soon be removed. It was used by the previous compiler because boost::regex_replace handles different types of formatters:

http://www.boost.org/doc/libs/1_57_0/libs/regex/doc/html/boo...

http://en.cppreference.com/w/cpp/regex/regex_replace


Nice approach. C++11/14 web frameworks are sorely needed. I was hoping to use one for an upcoming side project. If I go this route I'll let you know.

I hope this catches on.


Thanks. I would be happy to hear your feedback: what was nice, what feature/documentation is missing, what should be improved, etc...



My previous post was a link to the github repository. This post is about the new documentation website which gives much information about the framework.


That's great, but from a "Show HN" point of view, this isn't a new project. So we've taken "Show HN" out of the title and removed the duplicate penalty from this post.


Thanks Dang, I misunderstood the Show HN principles. I won't use it for the next Silicon updates.


Cool, but imho to claim "high performance" it should also have support for HTTP 2.


There are already several C implementations of HTTP 2. And it should not take too long to wrap them in a silicon backend.


Could we know why this post has been banned from the frontpage?

Thanks,

Matt


I was wondering where it went and had to google to find it again.


I hope the HN staff will read this message and figure out what happened...


Ok. My mystake was to post two Show HN: One for the git repository, one for the documentation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: