What is the truffle framework? Who can use it, who should use it?
And what are the benefits?
dapp-debuggingdapp-developmentframeworktestingtruffle
What is the truffle framework? Who can use it, who should use it?
And what are the benefits?
Embark is a development framework. It's used to make development faster and more streamlined by providing a set of tools / functionalities to make you more productive.
In the case of embark it makes/will make the process of creating a dapp faster by simplifying the interaction between your app front end and the contract (e.g. running your own blockchain for development purposes out of the box, even if it's already pretty easy to run your own node, comes ethereum ready as far as front end, etc.)
Any person willing to make dapps should use it at some point IMO (or another framework) simply for the productivity value but also to test your dapp etc. As for using it now, ethereum technology being quite young I would still suggest first learning ethereum " the hard way " to better use it in the future and to understand what you are doing.
There is also Truffle that I've heard about but I didn't quite look into it yet as I have just started checking embark and am still doing things framework free.
I'm the author of the ethereumjs-testrpc, and did much of the work on Ethersim during its early days, evidenced by this commit, the following commits and this unmerged PR. Ethersim was started by Iuri Mathias as an alternative to eth-testrpc, also written primarily by me, adapted from a script by Stephan George. eth-testrpc
was the first ever testrpc application available, but it was written in Python and missing many features. Because it was written in Python it was hard to maintain and install (for me at least), and because I didn't have much Python experience I couldn't reconcile an extremely annoying bug; it would, unfortunately, die of a race condition under heavy load. This became extremely problematic when I was preparing to demo an application for Devcon 1 in 2015, as eth-testrpc wouldn't reliably run my unit tests, stunting development. In a fit of rage I chose to rewrite eth-testrpc in Javascript, which is when I found Ethersim.
Ethersim was woefully unfinished when I found it, not supporting enough requests for the unit tests mentioned above. After a few late nights I had completely rewritten Ethersim, keeping Iuri's file structure but rewriting the internals to better integrate with ethereumjs-vm. Iuri eventually accepted this PR, and Ethersim has been working against this rewrite ever since.
Continuing to make Ethersim better, I submitted this PR, mentioned above. This PR made block handling better, and included two special RPC requests (evm_snapshot
and evm_revert
) which could significantly speed up unit tests and, if merged, would give Ethersim the ability snapshot the chain state at a specific block and revert back to that chain state later.
Unfortunately, this PR was never merged. As time went on, the ethereumjs community decided they wanted to consume one of these projects, either Ethersim master
or my changes in this new PR, as they were so closely tied to ethereumjs-vm. After discussing it, they chose to consume my fork as it seemed to have had more active development at the time.
Since this fork, their feature set has greatly diverged, with ethereumjs-testrpc consuming most if not all of Ethersim's features (I'm biased here, of course, but I highly encourage you to compare their README's). At the time of this writing, the following features exist in the TestRPC that do not exist in Ethersim:
geth
), useful for a wide range of analysis and scripting activitiesminer_start
and miner_stop
, like geth
, also useful for scripting and unit tests As far as I can tell from the README, Ethersim does not have any features that the testrpc does not support.
So the TL;DR, as biased as I might sound, is that ethereumjs-testrpc is a more fully featured blockchain simulator and has a wider array of uses. They both have the same goals, but ethereumjs-testrpc has seen more active development.
EDIT: Somehow I missed Karl's answer before answering myself, not sure how. This at least gives a history of their development and why a fork occurred.
Best Answer
What is Truffle?
Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier. It is one of the most widely used IDEs in the Ethereum community. Developers can use it to build and deploy DApps for testing purposes with many features that make it more attractive to users with a Web 3.0 dev background.
Features:
Who Should Use It?
Anyone who wants to dive into Ethereum development and needs a framework so they can better organize their DApp development assets and not have to worry about manually setting up a test environment.