C++ Adobe source libraries impressions? [closed] - c++

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I just stumbled upon Adobe source libraries, ASL. It is set of templates and functions similar to boost, under MIT license.
Some of the utilities in the library I found quite useful and now I consider using it.
the library seems pretty straightforward, however.
Have you used ASL yourself? if so, what were your impressions? do you recommend it?
does it work well with a range of compilers and platforms e.g. IBM C++, ICC, g++?
have you encountered quirks/unexpected things?
thanks

ASL uses Boost heavily, so it's not such similar to Boost, as (in some cases) a relatively thin wrapper around Boost.
The "big" pieces of ASL are Adam and Eve. Most of the rest appears to be (and if memory serves, really is) little more than support for those.
ASL hasn't been updated in a while, and if I'm not mistaken some of what it provides in wrappers around Boost has now been incorporated into the Boost libraries themselves (most Boost authors have been aware of ASL at least since they featured in Sean Parent's keynote presentation at Boostcon 1).
My own experience with them has been somewhat mixed. At one time, I used a couple of their Boost-wrapper classes a bit, but IIRC, within the next release or two, the bits I cared about were available in Boost without any wrappers (though offhand, I don't remember exactly what those pieces were...)
Adam and Eve are kind of cool for playing around with different UI layouts and such -- but I've never used them for a finished version of a program. At least to me, it appears that they're useful primarily with a relatively complex UI. My impression was that if you find them very useful, your UI probably needs work. If you need Adam and Eve to help understand what's going on, chances are your users can't figure out either.
OTOH, there are probably at least a few cases where a dialog is clear to a user, but the code much less so to a developer. If you do a lot of disabling some controls until values have been entered in other controls, and such, it can make it a lot easier to ensure controls are disabled until all values they depend upon have been entered.

As already noted, thew whole point of ASL is Adam and Eve, the rest are just handy tools.
Adam & Eve work together to describe UI with auto-layout in a cross-platform way.
If this is not what you need, then you should probably not spend much time on ASL.
Eve has the typical collection of vertical/horizontal/other containers for auto-layout.
And scripting with Adam allows you to achieve things difficult (if not impossible) to achieve just with layout containers (things like keeping separate groups of controls the same size, for instance).
True, you implement some of the rules in your C++ code. But it makes sense to store the UI description rules related to UI behavior in the same place where you store the UI to begin with.

Related

Differences between Wrapper and Library [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am curious to know the differences between a Wrapper and a Library.
From what I have been able to find online I can't really see any major difference between the two. I often came across "Wrapper Library" or "Library Wrapper" and it makes it seem as if they are basically one in the same.
However, my assumption is that a Library is a collection of finely tuned functions that provide a means to accomplish a task that isn't part of the core functionality in the language.
And a Wrapper is a facade that makes it easier and quicker to set up certain functionality within your program so that you have less typing to do.
These two descriptions just make it seem like it's the same thing with different wording to me though.. so I come to you Stackoverflow,
What are your opinions and professional points of view on Wrappers/Libraries?
Sidenote/Background:
This question stems from my C++ Design Patterns Class I finished a month ago:
In my C++ Software Design Patterns class we had to create a Socket Library that took the WinSock Library and created a Thin(Or Thick, our choice) Wrapper over it. We then had to create two applications that used our library so that we didn't have to repeat the basic set up and tedious coding of the WinSock Library. I ended up with 100% on the project but wish to know more about the actual differences or similarities because I want to expand on this project in my personal time.
In general, I personally think of it like this:
A library is typically an actual concrete implementation of some functionality.
A wrapper is mostly just a layer of abstraction around existing functionality. It is only intended to offer a better, cleaner interface (or at least one feels more native to the language or technology it targets) to something that already exists.
Now obviously there are times when the distinction between the two is crystal clear and times when the line is blurred, so some subjectivity may be inevitable in the latter scenarios. In other words, what you consider an implementation and what you consider simply an abstraction can be ambiguous occasionally.
For instance, a wrapper can have argument checking functionality or better state bookkeeping that the underlying system did not have. If this is mostly to serve the correctness of the abstraction, then it this still leans on the side of the wrapper. If some genuinely new functionality is added, it starts becoming a library and could be called a wrapper-library.
On the other hand, a full-fledged library may not be a wrapper at all, in the sense that it may leverage an underlying system to offer some functionality, but without exposing any considerable part of that underlying system in any clean interface (other than the specific functionality it adds). This would be called a library, but most probably it wouldn't be called a wrapper.
(I should clarify that what I said is how I think of the matter in general, not specifically in regard to C++. If the C++ world has less ambiguous definitions of these terms, please do correct me.)
Library is an generic implementation of any sort of functionality. Wrapper is a specific implementation intended to provide abstraction to existing library.

LEDA graph v/s Boost Graph library [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want efficiency and I am willing to write code by myself if efficiency (=0.9*speed + 0.1*others) is high. If I were to choose between LEDA graph or Boost graph, which one should I choose?
My algorithms are time-consuming (some are even non-polynomial in time) which works on large graphs.
Boost is generally a good library but I would not suggest Boost graph for a number of reasons.
The BGL documentation is execrable, with no easy to follow user guide. I have found that trying to define graphs with properties that are relevant to my own problems is very difficult.
You frequently end up with huge compiler errors that show templates within templates within templates ... nigh on impossible to see what is going on.
The only solution I found was to start with a trivial example that comes with Boost Graph, and adapt it until it does what I want.
I know of many bright and capable people that have ditched Boost Graph because of these reasons. Sad since there are very efficient algorithms underneath it all. For me BGL is the textbook example of template overuse. Boost Graph is a great idea that fails by missing the point entirely: code is worthless if it can't be read, maintained, extended, or debugged.
There are alternatives to LEDA/Boost implementation. You could do worse than to investigate this similar-sounding posting:
https://stackoverflow.com/questions/510758/can-you-suggest-a-good-book-on-graphs-and-graph-algorithms (link is no longer valid)
The Boost is continually refactored so parts of it get moved into the standard, after which vendor's continue to optimize it for the target systems they support. On rare usage scenarios, using inheritance the developer may tweak some part for specific case.
If the work is confined to C++, then as the parts of Boost are aiming to get integrated into the standard, it does have these advantages. There maybe specific reason to use proprietary LEDA, such as being guaranteed error free by testing, then as the decision maker only you have to observe such criteria.
Boost graph algorithms can be made to work on LEDA and even stanford graph base graphs, but not the other way around.
http://www.boost.org/doc/libs/1_46_1/libs/graph/doc/leda_conversion.html
I would suggest to use boost graph, it is the state of the art.
mike

Experiences using Wt C++ framework? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Has anyone seriously used Wt?
Did it work well?
Did you experience certain limitations? Or advantages?
Wt is a C++ library for developing web applications.
Please avoid the discussion of whether C++ is a good language for web development. I just want to give Wt a try because it seems like it could be a fun thing to do.
I've been using Wt to build apps that directly link to C++ libraries but don't particularly make a lot of effort to exercise the layout features such as CSS. So far, it works great as a replacement for GTK when building these kind of applications. I'm a Linux user exclusively and I'm also one of the unwashed heathen who actually enjoys programming in C++, and this framework is a perfect way for me to build an application that can actually be used across many platforms.
I have not personally used the framework, but have discussed it with a few people that have. They didn't really have any limitations, but I found it hard to believe they were compiling every time. Their main comment was that it was quite a light load on the server in terms of memory usage. Personally, I think the interpreted languages of php, python, ruby, etc work well with the nature of web development - but that's not the question you asked. Probably the biggest advantage is being able to use your existing skill set to work in a new medium.
There are also a few good comments online discussing pros and cons. Here is one I found http://discuss.joelonsoftware.com/default.asp?biz.5.599655.33
However, I think the main answer here is that without a specific project requirement in mind, it is going to be difficult to evaluate any framework for suitability. If you think it will be fun to try coding a few things with it, then give it a go. That is going to be the best (if not only) way to determine if it suits your needs.
I have tried several C++ embedded web servers. They tend to be a challenge to use, and not Windows friendly.
( You do not mention your platform. If you are on Unix, then I suspect you will find the available servers easier to use, and can probably ignore this answer. If you are on Windows, read on ... )
I have tried Wt, but was defeated by the massive installation, which takes hours to compile and generates page after page of warnings, and the extensive learning curve. Wt is modeled on Qt, so if you are familiar with Qt, the learning curve will be much less of a challenge.
I have tried Webio by John Bartas I liked the concept and it worked well. However, I found it overly complicated to use and the server code hard to understand. A lot of the complexity of Webio is caused by using an “HTML compiler” to hide the HTML pages that control the appearance of the GUI inside a file system embedded inside the application code. I prefer to have the HTML pages outside in plain view where I can adjust the GUI without recompiling the application.
I have also looked at TWS This is by Richard Hipp who is responsible for SQLITE and FOSSIL and of whom I am a great fan. However, TWS has not been maintained since 2001 and is not really WINDOWS, so I reluctantly decided not to pursue it.
In the end I rolled my own, called WEBEM based on a minimally modified version of the boost::asio web server. In concept similar to, but simpler than TWS, it permits html code to execute C++ methods.
To be honest, I had looked on it but I see one significant Wt design flaw -- it modeled after Qt. Trying to make web applications to look and behave like GUI.
I think, this approach is wrong. There should be clear separation between client side and server side.
If you are interested in C++ web programming take a look on CppCMS which has more traditional MVC model.
Note, I have biased opinion, because I'm developer of CppCMS.
Made a todo list app using it. works great, no problems.
I currently use it to develop a GPS measurements processing web application, based on processing algorithms implemented in C. It works well and has a good synergy with legacy C/C++ code.
It's documentation its not so extensive and the lack of learning tutorials and related books makes it somehow hard to learn.

Markdown Implementations for C/C++ [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is the best implementation of Markdown for C or C++?
I found these via Google, and would appreciate comments about which ones work well and which ones don't (and which ones I may have missed):
peg-markdown
Discount
Cpp-Markdown
libsoldout (formerly libupskirt)
peg-markdown depends on GLib and other 3rd part tools. I've tested it, it works quite well.
Advantages:
Dual-licensed under GPL and MIT.
Uses internally formal grammar, so easy to maintain and extend.
Disadvantages:
Depends on GLib
Provides C API.
Cpp-Markdown, Most C++ code but it is quite slow and little bit bloated. On the other hand it is quite easy to understand and modify, Depends on boost-1.35.
Advantages
Depends only on boost
Written in C++, looks like less dangerous
Licensed under MIT.
Disadvantages
Slow (it is still about 10 times faster then Perl implementation, but about 10 times slower than Discount)
Discount, This is the code I use for my blog http://art-blog.no-ip.info/cppcms/blog and wiki http://art-blog.no-ip.info/wikipp/en/page/main. It is written by hardcore C programmer and quite hardly mantainable (even the developer activly maintains it).
Advantages
Extremely fast
Written in pure C (no 3rd part dependencies).
Actively maintained
Has permissive 3 clause BSD license
Disadvantages
Almost impossible to maintain (even I could remove/add some fatures).
Has only FILE API, so I should tweak the code to make it work with general buffer.
Licensed under 4 clause BSD license that is incompatible with GPL. It is problematic if you want to use it not as part of your GPL-ed software.
Why do I know them so much?
I'm developing CppCMS, so I need a good markdown to HTML convertor. When I picked one (Discount), it was the only solution. Since then I've needed to replace it due to licensing issues. That said, I still quite like it because it is the fastest Markdown solution.
P.S.: If you want C++ wrapper for Discount, take a look on http://cppcms.svn.sourceforge.net/viewvc/cppcms/cms/trunk/cxxmarkdown/, It is not the latest version, but it is already tweaked.
EDIT: I have just visited Discount site and I had found that it had added a non-FILE API as well. So now it is real library.
EDIT 2: If you find better implementation or write your own under FOSS license, let me know ;)
EDIT 3: as cloose commented, discount had changed the license to 3 clause BSD.

c++ - relearning [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I haven't done C++ for about three years and looking to get back and ready. What is the best way? any open source projects that I might want to look at to recall all the details and be ready for interviews?
I started reading (again) C++ Primer 5th edition but was wondering whether there's more efficient way since I did program in C++ for few years before.
Just wanted to add: Does anyone know about open source projects related to finance? (e.g. servers, fix, etc)
I was facing a similiar situation a while back, and my conclusion was - no matter how many smart books you read nothing will suit you better then practicing.
Find some tutorials or set yourself some simple goals and learn by doing.
Hope that helps
PS. A friend of mine asked me once "How do you eat an elefant? - in small pieces, one at a time"
I'd start in on a real project.
If nothing else, download an open source C++ project that's in the same realm as the jobs you want to target, and start modifying. Practice helps more than anything for being comfortable.
If you're going to focus on reading, or in addition to practice, I'd actually focus on reading books that work more on using C++ well, not necessarily learning C++. Effective C++, More Effective C++, and Effective STL are great for this - you'll learn new things while refreshing your old knowledge. You can always use the primer book as a reference to study things you've forgotten as you read about them elsewhere.
Pick something that you know very little about and attempt to make a program that works with that subject area. For example if you've never done GUI work fire up C++ and try to create a simple paint program in the GUI framework of your choice (Qt, WTL, whatever). Or if you've never worked with a database grab SQLite and create a little app that manages your time. Or better yet, combine all these areas into a larger program.
The key is to force yourself to learn how to do real, practical things and solve problems using the languages paradigms. Books are great to reinforce certain practices but they'll never replace hours of frustration trying to figure out why your pointers aren't pointing where they're supposed to.
If you are good at maths (or statistics, probability, finance, geometry) and want to recall how to build re-useable functions, classes, and templates, you are welcome to help us at mathlibcpp. I recommend it, its good learning. Building a complete library on a large subject is very educatively hard ;) I found a chance to use all OO methods I know in C++, even forced to learn more.
Regarding Fix, there is QuickFAST, a very efficient implementation of the 'Fix for streaming' protocol.
Regarding C++, I would look for something that uses Boost, as it seems to be a premiere library for C++ (QuickFAST uses it to some degree).
Check out http://www.topcoder.com. This is an amazing tool for practicing programming in many different languages (C++, Java, C, C#). You can even win money if you get good at it:)
As with anything, write many programs, (re)read the best books (such as Effective C++, already mentioned). :-)
And ledger is an open source finance program written in C++. (GnuCash is another but written in C.)
Most of KDE is written in C++, albeit with Qt's signal extensions. Probably lots of examples of good code there.