You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 🚀 Build great modular monoliths or microservices faster, much faster
16
+
17
+
Bitloops Language (BL) is a high-productivity, domain specific language (DSL) that helps you focus on the business logic of your application which is what really matters.
19
18
20
-
Bitloops Language (BL) is a high-productivity, fourth generation programming language that has been designed and built by incorporating software development best practices and design methodologies such as [DDD](https://bitloops.com/docs/bitloops-language/learning/domain-driven-design), [BDD](https://en.wikipedia.org/wiki/Behavior-driven_development) and [Layered/Hexagonal Architecture](https://alistair.cockburn.us/hexagonal-architecture/).
19
+
It incorporates software development best practices and design methodologies such as [DDD](https://bitloops.com/docs/bitloops-language/learning/domain-driven-design), [BDD](https://en.wikipedia.org/wiki/Behavior-driven_development) and [Layered/Hexagonal Architecture](https://alistair.cockburn.us/hexagonal-architecture/).
21
20
22
-
The Bitloops Language guides and empowers any software developer to write clean code and build high-quality & well designed software. This is particularly relevant for applications that have complex, and frequently changing business requirements. Through Bitloops, developers can build software using principles such as separation of concerns, loose coupling, high cohesion and command query responsibility segregation (CQRS), which ensure systems are easier to understand, maintain and change.
21
+
The Bitloops Language guides and empowers any software developer to write clean code and build high-quality & well designed software. This is particularly relevant for server application software that has complex, and frequently changing business requirements. With BL, developers can build software using principles such as separation of concerns, loose coupling, high cohesion and command query responsibility segregation (CQRS), which ensure systems are easier to understand, maintain and change.
23
22
24
23
With Bitloops Language, developers are able to:
25
24
1.**Write clean code** in an intuitive and structured approach
26
25
2. Follow **best practices** to ensure the code and software can be easily understood by other developers
27
26
3. Create objects with **high cohesion and loose coupling** between each other
28
27
4.**Separate the busienss logic** from the **technical aspects** which leads to more **robust and flexible systems**
29
-
5.**Focus on the core domain** or problem, and not worry about boilerplate code
28
+
5.**Focus on the core domain** or problem, and not worry about boilerplate code and implementation details
30
29
31
-
In essence, software developers can focus on what they do best: **solving problems!** With Bitloops Language develoeprs write code that will allow other developers (and even themselves in 6 months) to easily understand and build on top of that code.
30
+
In essence, software developers can focus on what they do best: **solving problems!** With the Bitloops Language developers write code that will allow other developers (and even themselves after 6 months) to easily understand and build on top of that code.
32
31
33
32
<!--
34
33
Part of the Bitloops Language project, under the GPL-3.0 license
@@ -41,13 +40,13 @@ The GPL-3.0 license does not cover the use of Bitloops trademarks and logos
41
40
42
41
> ⚠️ Please keep in mind that the Bitloops Language is in its early stages
43
42
> and under very active development. Expect bugs and limitations.
44
-
> Full backward compatibility is not guaranteed before reaching v1.0.0.
43
+
> Any backward compatibility is not guaranteed before reaching v1.0.0.
45
44
46
45
47
46
48
-
## 👨💻 Quick Start
47
+
## 👨💻 Quick Start
49
48
50
-
The best and fastest way to understand how Bitloops Language helps you write clean code and great software is to follow the instructions below. With this tutorial, you will run and execute a Bitloops ToDo App, learn how Bitloops works, and see the output files in TypeScript and appreciate how the Bitloops Language works.
49
+
The best and fastest way to understand how the Bitloops Language helps you write clean code and great software is to follow the instructions below. With this tutorial, you will run and execute a Bitloops ToDo App, learn how Bitloops works, and see the output files in TypeScript and appreciate how the Bitloops Language works.
51
50
52
51
If you face any issues (especially with Windows) check the [Common Issues](#common-issues) Section below.
53
52
@@ -65,7 +64,7 @@ yarn global add @bitloops/bitloops-language-cli
65
64
```
66
65
67
66
### 2 - Clone the ToDo App example repo
68
-
The Bitloops [ToDo App](https://github.com/bitloops/bitloops-language/tree/main/examples/todo/bl-source) is readily available for cloning. You can extract the files following the link or clone it using the command beloe:
67
+
The Bitloops [ToDo App](https://github.com/bitloops/bitloops-language/tree/main/examples/todo/bl-source) is readily available for cloning. You can extract the files following the link or clone it using the command below:
Once the transpilation has concluded, you need to go into the folder into which the transpilation was run. If you followed the instructions above, you should only need to type the following:
92
-
93
-
```console
94
-
cd output
95
-
```
96
-
### 5 - Install the ToDo App depepdencies
97
-
In order for the ToDo App to work, you'll need to install the required npm packages. Use the following commands:
98
-
99
-
```console
100
-
npm install
101
-
```
102
-
103
-
or
104
-
105
-
```console
106
-
yarn install
107
-
```
108
-
109
-
### 6 - Run an instance of MongoDB
110
-
For the Bitloops ToDo App to run, you'll need MongoDB installed on your system. If you already have an MongoDB service installed, then proceed to step 5.4.
111
-
If you don't have MongoDB installed on your system, then we recommend you follow these easy steps to run MongoDB through Docker:
112
-
113
-
6.1 Install Docker using this [link](https://www.docker.com/). If you already have Docker installed, move to the next step.
114
-
115
-
6.2 Launch Docker on your system. The Docker service normally starts when booting a system, but you might want to confirm this before moving to the next step.
116
-
117
-
6.3 Install MongoDB in Docker using the following command.
118
-
119
-
```console
120
-
docker pull mongo
121
-
```
122
-
123
-
6.4 Start the MongoDB container
124
-
89
+
That's it! You can now run the following to see how many lines of code you saved yourself (spoiler alert: 77% or 2141 LoC!)
Ok now you have all your business logic beautifully transpiled into well structured TypeScript code 🎉🎉🎉!
129
95
130
-
### 7 - Run the Bitloops ToDo App
131
-
The final step is to execute the TypeScript backend code and run the Bitloops ToDo App. Use one of the following commands:
132
-
133
-
```console
134
-
npm run start:dev
135
-
```
136
-
137
-
or
96
+
## BUT wait! What about the server and all the infrastructure code? How am I supposed to run this?
138
97
139
-
```console
140
-
yarn start:dev
141
-
```
98
+
The scope of the Bitloops Language ends here but using Bitloops you can automatically generate everything else using Bitloops magic and AI! Bitloops will generate for you a Nest.js project and all the required infrastructure (gRPC or REST controllers, repository adapters for PostgreSQL or Mongo etc.) as well as docker or K8s files to deploy your system. To learn more about the automatic Bitloops process [click here].
142
99
143
-
### 8 - Create tasks!
144
-
Start sending requests to the Todo app using [Postman](https://www.postman.com/) or [curl](https://curl.se/), or any other way you prefer!
145
-
Here is an example using curl
100
+
Alternatively, you are free to use any framework you like or just an Express server or Fastify server etc.
146
101
147
-
```console
148
-
curl -X POST localhost:5001/api/todo/ -H "Content-Type: application/json" -d '{"title": "My first todo"}'
* Learn about key software development best practices, patterns and methodologies such as [Domain-Driven Design (DDD)](https://bitloops.com/docs/bitloops-language/learning/domain-driven-design), [Behavior-Driven Development (BDD)](https://en.wikipedia.org/wiki/Behavior-driven_development), [Test-Driven Development (TDD)](http://agiledata.org/essays/tdd.html) and [Layered / Hexagonal Architecture](https://alistair.cockburn.us/hexagonal-architecture/).
178
122
* Testing is treated as a 1st class citizen in the software development process
179
-
* Add different API controllers (REST, GraphQL, gRPC) with just a few lines of code
180
123
* Switch between Modular Monolith or Microservices architecture within minutes as all messages are moved through either in-memory or distributed message buses depending on your deployment choice
181
124
* Significantly reduce the amount of boilerplate code you need to write, maintain and debug
182
125
* Improved alignment between business and engineering with a natural ubiquitous language
183
-
* Ability to transpiles to widely used programming languages for maximum compatibility with existing code (currently [TypeScript](https://github.com/microsoft/TypeScript) support, Go, Java, C#, C++ or maybe even Rust or [Carbon](https://github.com/carbon-language/carbon-lang) to follow in the near future)
184
-
126
+
* Ability to transpiles to widely used programming languages for maximum compatibility with existing code (currently [TypeScript](https://github.com/microsoft/TypeScript) support, Kotlin, C#, Go, Java, C++ or maybe even Rust or [Carbon](https://github.com/carbon-language/carbon-lang) to follow in the future)
185
127
186
128
## 🤷♀️ Why build the Bitloops Language?
187
129
188
130
There are numerous great programming languages out there with massive and growing
189
131
codebases and investments. However, the most common problem faced by organizations
190
132
that build and maintain systems, with teams of developers working on them, is
191
-
good architecture and design;
133
+
good architecture and design of an interconnected system of services;
192
134
193
-
Designing a complex system so that it can last through
194
-
time and will allow developers (existing and new joiners) to work on its codebase
195
-
with steady (or hopefully) increasing productivity is very difficult.
135
+
Designing a complex system so that it can last through time and will allow developers (existing and new joiners) to work on its codebase with steady (or hopefully) increasing productivity is very difficult.
196
136
197
-
Good testing is an additional major requirement of long lasting products which is also made possible by good architecture
198
-
and design. Unfortunately, there aren't enough knowledgeable and experienced senior
137
+
Good testing is an additional major requirement of long lasting products which is also made possible by good architecture and design. Unfortunately, there aren't enough knowledgeable and experienced senior
199
138
engineers around the world to build and maintain great systems for all who need them.
200
-
Even when a company is lucky enough to have some, it is unable to hire more
201
-
junior engineers than the senior ones can review their work and guide in order to make
202
-
sure the system does not degrade over time due to bad design decisions.
139
+
Even when a company is lucky enough to have some, it is unable to hire more junior engineers than the senior ones can review their work and guide in order to make sure the system does not degrade over time due to bad design decisions.
203
140
204
141
The Bitloops Language is the first programming language that aims to address these issues
205
142
by making it much easier to adopt important software engineering principles and patterns
@@ -214,68 +151,53 @@ Every software engineer has a common goal: we want to write better code and buil
214
151
215
152
However, this can only be achieved with significant and continuous dedication, learning and experience, which takes a lot of time. Bitloops wants to significantly reduce the time it takes a developer to start building high-quality software, and we have built the Bitloops Language that already incorporates many of the software development best practices and design methodologies.
216
153
217
-
Ultimately, Bitloops' goals are to:
154
+
Ultimately, BL's goals are to:
218
155
156
+
* Put the focus on the domain and you business logic and automate everything else as much as possible
157
+
* Delay infrastructure work and decisions as much as possible as these are implementation details
219
158
* Increase developer productivity significantly, not only at the start of a project, but for the entire lifecycle!
220
159
* Reduce the time and cost to build new features and products, even on large / complex projects
221
160
* Reduce the learning curve (specifically of DDD, BDD and Layered/Hexagonal Architecture) needed to build and maintain great software
222
161
* Empower many more software developers to learn & adopt these important principles and best practices
223
-
* Reduce the dependency on developer discipline during the code development process, with a structured process
162
+
* Reduce the dependency on developer discipline during the code development process, with a structured process
224
163
* Make testing a more integral, collaborative, useful, and fun process
225
-
* Put the focus on the domain and automate everything else as much as possible
226
164
* Make domain logic timeless as well as platform & language independent
227
165
* Eliminate the need for boilerplate code & enable the reuse of existing packages writen in any language
228
166
* Empower software engineers to postpone the need for a microservices architecture until it is strictly needed from a infrastructure perspective to better manage computing and engineering resources (reduce intial costs! 💰💰💰)
229
167
* Allow systems to be converted from a modular monolith to a microservices architecture in hours, not months
230
168
231
169
The Bitloops Language aims to define and retain a simplistic syntax that will be as close to human
232
170
language and business logic as possible that will become timeless, helping adopt and use a ubiquitous
233
-
language within each module or bounded context.
234
-
235
-
Making the Bitloops Language a transpiled language was a core decision to achieve exactly this. By allowing oraganisations to write their business logic
236
-
in a timeless language that can be transpiled to powerful but also changing target languages without
237
-
burdening the users of the Bitloops Language with this task. The Bitloops Language will make sure it
238
-
transpiles to optimized code of relevant, up-to-date, and right-for-the-task languages.
171
+
language within each module or bounded context. It is then BL's job to transpile into modern and up-to-date syntax of your target language.
239
172
173
+
Making the Bitloops Language a transpiled language was a core decision to achieve exactly this. By allowing oraganisations to write their business logic in a timeless language that can be transpiled to powerful but also changing target languages without burdening the users of the Bitloops Language with this task. The Bitloops Language will make sure it transpiles to optimized code of relevant, up-to-date, and right-for-the-task languages.
240
174
241
175
## 📌 Project status
242
176
243
-
The Bitloops Language is currently in early stages. Its transpiler has been created as a proof of concept
244
-
and is not meant to cover the full range of developer creative code writing at this stage.
177
+
The Bitloops Language is currently in early stages. Its transpiler has been created as a proof of concept and is not meant to cover the full range of developer creative code writing at this stage.
245
178
246
179
We want to better understand whether we can build a language that meets your needs, and whether we can
247
180
gather a critical mass of interest within the DDD community and outside of it.
248
181
249
-
Currently, we have fleshed out several core aspects of the project and the language:
250
-
251
-
* The strategy of the Bitloops Language and project.
252
-
* Critical and foundational aspects of the language design. This
253
-
includes designs for:
254
-
* Class types
255
-
* Inheritance
256
-
* Lexical and syntactic structure
257
-
* Code organization and modular structure
258
-
* A prototype transpiler that can run example projects is a few days away.
259
-
* We are currently writing up documentation to release along with the first version of the transpiler.
260
-
261
182
There are many things we want to add in the future including
262
183
263
-
-[] CQRS support
184
+
-[X] CQRS support
264
185
-[ ] Event Sourcing support
265
-
-[ ] Java target language
266
-
-[ ] gRPC support
186
+
-[ ] Kotlin target language
187
+
-[ ] C# target language
188
+
-[ ] Golang target language
267
189
-[ ] And many more...
268
190
269
-
If you're interested in contributing, we would love help!
270
-
191
+
If you're interested in contributing, we would love your help!
192
+
271
193
----
272
194
273
195
## 🏗 Bitloops -> TypeScript Transpilation
274
196
275
197
If you are already aware of the DDD concepts (Aggregates, Value Objects, Use Cases, Controller, etc.) and know how to code in any modern programming language, it should be really easy to pick up the Bitloops Language.
276
198
It is built out of a consistent set of language constructs that should feel familiar and be easy to read and understand.
277
199
278
-
While Bitloops is an Object Oriented Language, it doesn't have a generic class. Specific Bitloops classes are build-in as follows: ValueObject, Entity, Root Entity, UseCase, RESTController, GraphQLController, GRPCController, DTO, Props, Config, OK, ApplicationError, DomainError, Error etc.
200
+
While Bitloops is an Object Oriented Language, it doesn't have a generic class. Specific Bitloops classes are build-in as follows: ValueObject, Entity, Root Entity, Command, CommandHandler, Query, QueryHandler, DTO, Props, OK, ApplicationError, DomainError, Error etc.
0 commit comments