10. Device model(
name optional text[min 1, max 20]
gsmNumber text[min 1, max 20]
imei text[min 5, max 5, sensitive]
role Role
status DeviceStatus
hotel optional Hotel
isBroken boolean
lastLocation gpsCoordinates
timestamp datetime
isDeleted boolean
)
In only this much
12. The challenge:
• Higher level abstractions = loss of low level control
• Focus only on a specific domain
• No flexibility
• Resulting code can’t be treated as machine code
13. Current approaches:
• Force you to write your own patterns
• Way too general
• Generate code that is marked as "generated"
• Generate code that can be inherited
• Generated code is sub-optimal
14. The Sifu way:
• High level DSL for client/server data-driven applications
• Patterns and good practises included
• Translates to code that can be freely changed and extended
• Code looks like it was written by an experienced developer
16. SifuDSL:
• DSL specially designed for web and mobile developers
• Describe your backend and client like you would describe it to your peer
• Say no to incomplete and out of date specifications nobody reads
17. SifuCompiler:
• Does the dull work for you.
• Checks your specifications for errors and applies all of the best practices.
• It's smart it adds everything you will need to the code base so it's there when
you need it.
18. SifuLinker:
• Transforms your specification to maintainable code.
• The same code as you would write it yourself!
• It can support the tech stack of your choice.
19. You own the whole codebase!
Mix the code you created with Sifu and manually without the fear of losing any
while changing the code base.
Keep the specs up to date and benefit from using Sifu throughout the application
lifecycle.
20. Up to 90% of codebase can be created
with Sifu alone!
I think you will agree with us, programming is harder than it should be.
Even when you know exactly what you want to build and how you want to built it.
You need to write it!
Just imagine!
this
and this
and this
and this
and this
and this
and this
But at the same time all the information you need to do it can be written like this.
So why wouldn’t you just write it like this?
But at the same time all the information you need to do it can be written like this.
So why wouldn’t you just write it like this?
There are a few challenges:
- the fundamental problem with higher level abstractions is the loss of low level control
- with a higher level of abstractions, the more you have to focus on a specific domain
- it’s impossible to do everything with purely high level abstractions if you want to solve real world use cases
- generated code still needs to be read and modified by humans, so it cannot be treated as machine code (e.g. has to be optimized)
Current approaches:
- force you to write your own patterns, which implies a significant amount of work from your side
- are too general, meaning the effort required is not significantly better than writing pure code
- provide you with generated code that is marked as "generated", meaning that it will be overwritten each time the tool is used
and as such cannot be edited
Or
- provides you with generated code that can be inherited, allowing some level of modification but only in a way that original
developers predicted
- generated code is usually sub-optimal, meaning that the code is not human readable and often includes a lot of code that will never be used
Our approach
- Instead of focusing on business domain when building our DSL we have focused on the developer domain. In our case those are client/server data driven applications.
- We have included all of the proven industry patterns and best practised in the tool so developers can start using it in a matter of minutes.
- Resulting code can be freely changed and extended, and most importantly code looks like it was written by an experienced developer.
We have based Sifu around 3 key components.
What does this DSL support?
Specification data is used to build an application model.
Describe common high level concepts, such as:
- models
- security constraints
- finely-grained APIs
- UI that binds to the specified APIs
- dependencies to external services like OAuth providers, payment processors, Google maps, S3 file storage etc…
- ...
It does just that, all of the dull work, so you can use your creativity.
Generate the code via technology specific templates:
- Smart templates: are crucial to making sure that the generated code is optimized, e.g. it needs to be exactly as an (experienced) developer would have written it
- Include "production" ready features by default (e.g. logging, monitoring, security configuration, development profile,...)
Yes, you own all of the codebase that was made using Sifu or customly added. If you at any point want to ditch Sifu you can do it easily.
You simply own all of the code at the end of the day.
Early users reported some exciting stats.
We didn’t expect this to happen, but is seems that teams are using our specs as a form of communication, as it’s much easier to grasp the whole project when looking at far less lines of code.
Visit: codesifu.com/getstarted
Follow us: https://twitter.com/sifuHQ and https://www.facebook.com/sifuHQ/