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
- An overview : https://github.com/in28minutes/java-best-practices/blob/master/pdf/CodeQuality.pdf
42
42
- More than everything else, code quality is an attitude. Either, the team has it or not. The attitude to refactor when something is wrong. The attitude to be a boy scout. As an architect, it is important to create an environment where such an attitude is appreciated. (There are always bad sheep, who take the code quality to such depth that it is not fun anymore, but I like them more than developers who keep churning out bad code).
43
43
- Have a good static analysis tool(and is part of Continuous Integration). Sonar is the best bet today. Understand the limits of Static Analysis. Static Analysis is not a magic wand. For me, results from Static Analysis are a signal: It helps me decide where I should look during peer or architect reviews?
44
44
- Have good peer review practices in place. Every user story has to be peer reviewed. Put more focus on peer reviews when there is a new developer or there is a new technical change being done. Make best use of Pair Programming. The debate is ongoing : Is pair programming more productive or not? I would rather stay out of it. You make your choice. However, these two scenarios are bare minimum:
- PDF : https://github.com/in28minutes/java-best-practices/blob/master/pdf/CodeReview-BestPractices.pdf
70
76
71
-
72
77
## Modern Development Practices
73
78

74
79
- Unit Testing and Mocking : We are in the age of continuous integration and delivery, and the basic thing that enables those is having a good set of unit test in place. (Don’t confuse unit testing with screen testing done manually to check if the screen flow is right. What I mean by unit testing is JUnit test’s checking the business logic/screen flow in a java method (or) set of methods). Understand JUnit. Here is a good start : https://www.youtube.com/watch?v=AN4NCnc4eZg&list=PL83C941BB0D27A6AF. Also understand the concept of Mocking. When should we mock? And when we should not? Complicated question indeed. Understand one mocking framework : Mockito is the most popular one. Easymock is a good mocking framework as well.
- Refactoring. Is there an Architect who does not encounter bad code? Understand refactoring. Understand the role of automation tests in refactoring.
79
84
- Continuous Integration. Every project today has continuous integration. But, the real question is “What is under Continuous Integration?”. Compilation, unit tests and code quality gate(s) is the bare minimum. If you have integration and chain tests, wonderful. But make sure the build does not take long. Immediate feedback is important. If needed, create a separate build scheduled less frequently for slower tests (integration and chain tests). Jenkins is the most popular Continuous Integration tool today.
80
85
[[ModernDevelopmentPractices.png]]
86
+
81
87
### Unit Testing
88
+
82
89
#### Unit Testing Best Practices
83
90
[Unit Testing Best Practices](pdf/UnitTestingBestPractices.pdf)
91
+
84
92
#### Why is unit testing important?
93
+
85
94
#### Why is performance of Unit Tests important?
95
+
86
96
#### Do not be fooled by Code Coverage?
97
+
87
98
#### Why should a good programmer understand Mocking?
99
+
88
100
### What is TDD?
101
+
89
102
#### Why should you write unit tests with/before code?
#### Why is it important to use Continuous Integration from Day 0 of the project?
170
+
145
171
#### What is a vertical slice? Why should you need it?
172
+
146
173
#### Why should you create a reference component?
174
+
147
175
#### Agile and Architecture. Do they go together?
148
176
- First of all I’m a great believer that agile and architecture go hand in hand. I do not believe agile means no architecture. I think agile brings in the need to separate architecture and design. For me architecture is about things which are difficult to change : technology choices, framework choices, communication between systems etc. It would be great if a big chunk of architectural decisions are made before the done team starts. There would always be things which are uncertain. Inputs to these can come from spikes that are done as part of the Done Scrum Team.But these should be planned ahead.
149
177
- Architecture choices should be well thought out. Its good to spend some time to think (Sprint Zero) before you make a architectural choice.
150
178
- I think most important part of Agile Architecture is Automation Testing. Change is continuous only when the team is sure nothing is broken. And automation test suites play a great role in providing immediate feedback.
151
179
- Important principles for me are test early, fail fast and automate.
180
+
152
181
### Layers
153
182
- PDF https://github.com/in28minutes/java-best-practices/blob/master/pdf/LayeringInJavaApplications.pdf
154
183
@@ -181,6 +210,7 @@ Listed below are some of the important considerations
181
210
- Do we need to expose external web services?
182
211
183
212
### Web Services
213
+
184
214
### SOAP Web Services
185
215

186
216
@@ -189,17 +219,24 @@ Listed below are some of the important considerations
189
219
190
220
#### How should you document your REST Web Services?
191
221
- Swagger
222
+
192
223
### Microservices Architecture
224
+
193
225
#### What are Cloud Native Applications?
226
+
194
227
#### What are micro-services?
228
+
195
229
#### Why is it important to have an API Standard?
196
230
- YARAS
231
+
197
232
#### What is the importance of Logging and Centralized Monitoring?
233
+
198
234
#### Automate! Automate! Automate!
199
235
- Why is it important?
200
236
- Personal Experience with Deployment Automation, Providing user screen with requests/responses
201
237
202
238
### Component Based Architecture
239
+
203
240
#### Why should you create small components?
204
241
205
242
## How to be a good architect?
@@ -223,28 +260,41 @@ Most important qualities I look for in an Architect are
#### What happens behind Maven? What is a Repository?
269
+
229
270
#### What is use of Maven Parent POM?
271
+
230
272
#### Maven Best Practices
231
273

274
+
232
275
#### 10 Tips For Maven
233
276
[10 Tips for Eclipse and Maven](pdf/10TipsforEclipseAndMaven.pdf)
277
+
234
278
### Why should you have api & impl in each layer maven projects?
279
+
235
280
### IDE - Eclipse
236
281

237
282
238
283
#### 10 Tips For Eclipse
239
284
[10 Tips for Eclipse and Maven](pdf/10TipsforEclipseAndMaven.pdf)
285
+
240
286
### Version Control
287
+
241
288
#### Why should you migrate to GIT?
289
+
242
290
#### Why should you commit your code often?
291
+
243
292
#### What are version control best practices
244
293
- Do not commit derived files.
245
294
- Do not commit IDE files.
246
295
- Commit often
247
296
- Use Git
297
+
248
298
## Frameworks
249
299
250
300
## Performance
@@ -262,11 +312,14 @@ Most important qualities I look for in an Architect are
262
312

263
313
264
314
### Why do Stateless applications perform better?
315
+
265
316
### Why should you optimize judiciously?
317
+
266
318
### How can you increase performance and reliability of applications using Queues?
267
319
268
320
### Distributed Cache
269
321

322
+
270
323
### Load and Performance Testing
271
324
- PDF Presentation https://github.com/in28minutes/java-best-practices/blob/master/pdf/LoadAndPerformanceTestingBestPractices.pdf
272
325
- Have clear performance objectives. That’s the single most important objective. Decide Peak Load, Expected Response Time, Availability Required before hand.
0 commit comments