I'm pretty new to Ethereum platform. I went through many tutorials and I understand that smart contracts contains back-end logic (link). Most of the examples I found implemented financial contracts, voting contracts etc. How can I implement complex back-end logic in solidity ?
Let's say I wanted to create a poker website. I think it's really hard to code all the logic using solidity contracts, since solidity doesn't seem to have much features. Another situation where I wanted to export all the data to excel or generate pdf / reports (I usually use python-flask), how can I implement such complex operations using solidity? Even if it's possible, doesn't it cost a lot of gas?
Don't think of Solidity, or smart contracts, as the entire back-end. Sure it can be, in some use cases where it's useful and make sense.
In case of your Poker example, a lot of the logic can be coded in your backend of choice. Having that backend, along with the client-side app, interact with the smart contracts (and state channels) for the handling of bets, recording the winner, sending of funds, etc.... Use the blockchain as it was intended - a digital ledger.
– Matt Swezey Jan 31 '18 at 15:56