Code Monkey home page Code Monkey logo

winter-framework's Introduction

Winter Framework

My tryout to create simplified version of Spring Framework core for educational purposes.

I was inspired by this article.

Supported features

  • Classpath scanning for components
  • Multi-staged constructor for components
  • Field or setter based dependency injection
  • Aware callbacks: BeanNameAware, BeanFactoryAware
  • Bean post processors support, with post processing before and after initialization
  • Javax bean lifecycle annotations support: @PostConstruct, @PreDestroy
  • InitializingBean and DisposableBean callbacks
  • Application event listening

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

The project has no dependencies, it uses only pure java, you don't need to preinstall anything except java.

โœ— java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

Installing

Clone the project and open in your favourite IDE.

End with an example of getting some data out of the system or using it for a little demo

Running

Just run Main.java to test framework functionality. Several services created fot testing purposes:

These testing classes are designed to demonstrate all features and provide following console output:

==Initializing bean factory==
==Populating bean properties==
@PostConstruct is called in AnotherServiceBean
com.github.vlsidlyarevich.test.ServiceBean@5b275dab is set
AnotherServiceBean is called
serviceBean is called
FirstRepositoryBean is called
com.github.vlsidlyarevich.winterframework.beans.factory.SimpleBeanFactory@61832929 is here
Context is closed

Bean lifecycle

Framework supports following bean lifecycle:

Bean lifecycle

Contributing

This project is just my research based on this article. No any specific rules of contribution needed.

Authors

Vladislav Sidlyarevich - Github profile

License

This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details

winter-framework's People

Contributors

akraskovski avatar vlsidlyarevich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

winter-framework's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.