Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

2/9/19

Week #6's Wednesday Evening Training: A practical introduction to C# code reviewing

Reviewing code requires to have a fresh and different view on (your colleague’s) code. You need to look for bad practices, think out of the box, follow your gut feeling, know about best and bad practices. You need to find a balance between advising about improvements and flat out rejecting code.

This Wednesday Evening Training, we had a practical overview and deep dive into code reviewing. One of our C# champions, Bart Roozendaal, showed us what we can look for specifically in code.

What to look for when reviewing code?

You can take a look at the general structure, tidiness, common errors, code smells and easy to find things. And there is a lot of checks and examples to be found on the internet as well. But what is also important is to view your code from particular viewpoints like security, efficiency and exception handling (error handling). It is definitely worth thinking out of the (language) box when developing a software program. Especially if your code is part of a much larger whole. And that is increasingly the case nowadays.



This evening was all about sharing experiences and opinions. There is no definite right or wrong, there are only considerations that you should make in a sensible manner. For example; there are multiple strategies to choose from when handling errors. How far do you have to go to catch errors in the code? This depends, for example, on the purpose of the program and the damage that specific errors can cause.

We did a walk through of  an existing C# solution and discussed the different findings. Very educative. The code was written in C #, but that was certainly no problem for Java engineers.

During the walk through we also discussed tooling that you can use for testing your software. See the links below for some of the tools we discussed.

To be continued...

We will certainly organize follow-up sessions on this topic. Next time, participants are invited to bring their own code to have reviewed, or bring interesting samples found. The Wednesday Evening Trainings are all about sharing knowledge and experience and learning from each other.

Thanks Bart for sharing your knowledge and experience with us!



Further reading

Do you want to read more on the topics in this post? Here are some links…

List of tools for static code analysis: https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis
CodeMaid - An open source Visual Studio extension to cleanup and simplify C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding: http://www.codemaid.net/
NCrunch - An automated concurrent testing tool for Visual Studio: https://www.ncrunch.net/

Past Wednesday Evening Trainings on all topics

You 'll find post of previous sessions on my blog and on LinkedIn: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Work at Capgemini?

Do you want to join us? We're always looking for and well-motivated young professionals. Do you have a bachelor or master degree or extensive practical experience? Or do you have a relevant ICT / Informatics training and you have become curious about us? Please send me an email. Working for us gives you access to all Wednesday Evening Trainings!

8/9/18

This week's Wednesday Evening Training: Microservices architecture and implementation in Java

A bit of architecture and a lot of code this week's Wednesday Evening Training. Together with Bart van Beek, one of our expert Java software engineers, I gave explanation on the architecture, design and engineering of a Microservices architecture.


So what is this "Microservices" architecture?

Let me give you a very, very, very short introduction. See the links in the bottom of this article for further reading & coding.

Since the creation of the first applications, we've continously been attempting to divide an application in manageable parts, so that we could design, develop, deploy and manage applications more effectively and efficiently. This is crucial because solutions nowadays more resembles a continuously changing eco system, rather than a stable and easily manageable one-piece software. Web services have made it possible to connect full applications over the internet in a standardized way, Microservices take this a step further. Microservices are deployed as a light weight, but fully functional applications with very limited functionality. Connected, they form fully functional capabilities (ready to use functionality and data) of which the parts can be changed, deploy and managed independently of each other. This enables continuously changing and deploying sofware parts by independend teams, in different technologies (e.g. Java, .NET) and scaling more easily by deploying the parts on different locations. Using virtual infrastructure and containers (e.g. Docker) you will be able to scale in and out very fast so that you can tune your software infrastructure neatly to what you need at a particular moment.

This drastic increase in flexibility comes with it's price: you will need to put more effort in implementing functionality like communication, coordination, orchestration, monitoring and exception handling that is normally handled in application and integration platforms. Also, engineers need also to be proficient with infrastructure and business processes, instead of just one programming language and related tools.

Therefore, it is increasingly important to follow patterns (standardized solutions). Luckily, there are a lot of patterns available. See the links in the bottom of this article for some of the resources on patterns.


Back to this evening's training...

After my introduction on Microservices architectures and related patterns, Bart gave us a demo and code walkthrough of a Java based Microservices implementation. We could experiment with the example implementation he provided and learned a lot of this. On the internet, we also found a reference implementation of a (Microsoft) Azure reference implementation. In a follow up we'll do a walkthrough of this implementaion as well, and also create a prototype solution in which we'll implement a Microservices solution using both Java and Microsoft technologies. To be continued...

One of the nice things of the Wednesday Evening Training is that we can decide on the spot which technology to discuss. So an evening that is originally focussed on a particular technology can suddenly be enriched with a completely different topic. One of our colleagues, Quincy Jacobs, had dived into OpenGL. OpenGL is closely related to BabylonJS which can be used combined with Unity3D, on which we already had some workshops. On the spot, we decided to plan an wednesday evening combining these topics, combining explanation on the underlying (3d) concepts and experimenting combining the technologies. Also to be continued...


Further reading

Do you want to read more on the topics in this post? Here are some links...

Introductions:
Microservices: https://en.wikipedia.org/wiki/Microservices
Service Oriented architecture: https://en.wikipedia.org/wiki/Service-oriented_architecture
Microservices vs SOA: https://www.bmc.com/blogs/microservices-vs-soa-whats-difference/
Microservices, a definition of this new architectural term: https://martinfowler.com/articles/microservices.html
Why a microservices approach to building applications? (giving an approach to designing and implementation) https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview-microservices
Designing, building, and operating microservices on Azure: https://docs.microsoft.com/en-us/azure/architecture/microservices/

Patterns:
Microservice patterns (explanation and patterns): http://www.microservicepatterns.org/
Cloud patterns (explanation and patterns): http://cloudpatterns.org/

Lots of info on patterns on Wikipedia as well...

Example code:
https://github.com/mspnp/microservices-reference-implementation

By the way: in https://github.com/mspnp (Microsoft patterns & practices on GitHub) you'll find lot's of interesting example code on patterns. Well worth visiting!

Past Wednesday Evening Trainings

You'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Next Wednesday Evening Training

Next Wednesday Evening Training, we'll have a "klusavond" in which we'll work on our projects. In the photo below, you'll see Aish already busy preparing the hardware :).



#capgemini #werkenbijcapgemini #lifeatcapgemini #wednesdayeveningtraining #microservices #microsoft #java

5/30/18

This week's Wednesday Evening Training: Infrastructure basics, part 2: What you should know about web servers

In this Wednesday Evening Training, we continued our exploration of basic infrastructure. This time, we explored web server technology. In this, a special welcome for our French colleague Théo Berthin who visited our Dutch site.

Apache, IIS, Tomcat, all are fine examples of webservers. But how do they work, from a technical point of view? In this session we have taken a look at the whole process of accepting and processing requests and generating responses. Which components are involved, how do they interact and how has the web server technology involved the past decade(s)?
Bart van Beek and I had prepared a presentation and some demo's / walkthroughs for this.

After a deep dive into the http protocol, requests and responses, we first discussed IIS. IIS, Internet Information Services, is the web server technology of Microsoft. We have discussed processing requests, the request pipeline, process handling with application pools and web workers, how IIS supports .NET and .NET Core and how .NET Core applications are served using other web server platforms on non-Microsoft Operating Systems.

We enjoyed demo's / walkthroughs on Spring and Tomcat web server, and Microsoft's IIS and had plenty of opportunity for lively discussions on security, scaling and other technical topics. Especially when NodeJS (as a web server) came up, the discussion seemed to intensify ;).



As a bonus, Bart van Beek has given us a recap on the Open Systems Interconnection model (OSI). This model is a conceptual model that characterizes and standardizes the communication functions of a telecommunication or computing system without regard to its underlying internal structure and technology. http, tcp/ip can be placed in this model.
Also this time, Bart managed to largely fill the room-wide whiteboard!



There definitely were plenty of questions left at the end of this week's Wednesday Evening Training. Also, the community would like to experiment with both platforms in handson labs. In the next Wednesday Evening Training on infra we'll definitely include labs for both IIS and Spring/Tomcat and provide some answers on the remaining questions.

To be continued!



Further reading

Do you want to read more on web server technology? Here are some links...

OSI model:   https://en.wikipedia.org/wiki/OSI_model
Web server (rather obvious, but a nice place to start anyway):https://en.wikipedia.org/wiki/Web_server
IIS official site (obvious as well): https://www.iis.net
More on ASP.NET Core Running under IIS: https://weblog.west-wind.com/posts/2017/Mar/16/More-on-ASPNET-Core-Running-under-IIS
Serving Web Content with Spring MVC: https://spring.io/guides/gs/serving-web-content/
Apache Tomcat (the place to start): http://tomcat.apache.org/
NodeJS: https://www.w3schools.com/nodejs/nodejs_http.asp

Past Wednesday Evening Trainings

You'll find post of previous sessions here: https://www.linkedin.com/search/results/content/?keywords=%23wednesdayeveningtraining

Next week

In next week's Wednesday Evening Training, we'll be taking a deep dive in infrastructure a well. In this "how stuff works" session we will discuss various infra topics from a technical point of view.


#capgemini #werkenbijcapgemini #lifeatcapgemini #wednesdayeveningtraining #iis #tomcat #spring #microsoft #webserver #java #nodejs #dotnet #dotnetcore #dotnetcore #kestrel #httpsys

2/21/18

This week's Wednesday Evening Training: Authentication, Autorization & Auditing basics and implementation in .NET Core and Java

In this session, Ronnie Jongenelen and Bart van Beek gave us a nice introduction on Authentication, Autorization & Auditing. Implementations in both ASP.NET Core (Identity Framework) and Java (Spring) were demonstrated and illustrated with a code walkthrough. We've had plenty of opportunity for Q&A and discussion. In this session we also welcomed Rene Wiedeman of the UWV architect community. Thanks for joining us Rene!

To be continued!

#werkenbijcapgemini #lifeatcapgemini #capgemini #wednesdayeveningtraining #microsoft #dotnetcore #java #spring