Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37859 > unrolled thread

SDI - Simple Dependency Injection

Started byMarcin Kuszczak <marcin.kuszczak@gmail.com>
First post2017-12-18 03:44 -0800
Last post2017-12-19 08:24 -0800
Articles 19 — 7 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  SDI - Simple Dependency Injection Marcin Kuszczak <marcin.kuszczak@gmail.com> - 2017-12-18 03:44 -0800
    Re: SDI - Simple Dependency Injection Daniele Futtorovic <da.futt.news@laposte.net> - 2017-12-18 18:52 +0100
      Re: SDI - Simple Dependency Injection Marcin Kuszczak <marcin.kuszczak@gmail.com> - 2017-12-18 10:43 -0800
        Re: SDI - Simple Dependency Injection Eric Douglas <e.d.programmer@gmail.com> - 2017-12-18 10:46 -0800
          Re: SDI - Simple Dependency Injection Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-12-18 13:53 -0500
          Re: SDI - Simple Dependency Injection Arne Vajhøj <arne@vajhoej.dk> - 2017-12-18 19:27 -0500
            Re: SDI - Simple Dependency Injection Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-12-18 20:14 -0500
              Re: SDI - Simple Dependency Injection lewbloch@gmail.com - 2017-12-19 11:46 -0800
        Re: SDI - Simple Dependency Injection Eric Douglas <e.d.programmer@gmail.com> - 2017-12-18 11:16 -0800
          Re: SDI - Simple Dependency Injection Kiwi User <martin@mydomain.invalid> - 2017-12-18 19:47 +0000
            Re: SDI - Simple Dependency Injection Eric Douglas <e.d.programmer@gmail.com> - 2017-12-18 12:35 -0800
              Re: SDI - Simple Dependency Injection Kiwi User <martin@mydomain.invalid> - 2017-12-18 21:48 +0000
                Re: SDI - Simple Dependency Injection Eric Douglas <e.d.programmer@gmail.com> - 2017-12-18 13:56 -0800
                  Re: SDI - Simple Dependency Injection Kiwi User <martin@mydomain.invalid> - 2017-12-18 23:16 +0000
            Re: SDI - Simple Dependency Injection Arne Vajhøj <arne@vajhoej.dk> - 2017-12-18 19:24 -0500
              Re: SDI - Simple Dependency Injection Kiwi User <martin@mydomain.invalid> - 2017-12-19 00:46 +0000
          Re: SDI - Simple Dependency Injection Marcin Kuszczak <marcin.kuszczak@gmail.com> - 2017-12-18 13:22 -0800
            Re: SDI - Simple Dependency Injection Eric Douglas <e.d.programmer@gmail.com> - 2017-12-18 13:29 -0800
    Re: SDI - Simple Dependency Injection Eric Douglas <e.d.programmer@gmail.com> - 2017-12-19 08:24 -0800

#37859 — SDI - Simple Dependency Injection

FromMarcin Kuszczak <marcin.kuszczak@gmail.com>
Date2017-12-18 03:44 -0800
SubjectSDI - Simple Dependency Injection
Message-ID<ccc860e9-c9b6-453f-a7e8-658b832ebbe3@googlegroups.com>
Hi guys!

I have just released SDI - Simple Dependency Injection framework.
It is really light and does not enforce anything on a user, does not use annotations, or any kind of XML. It helps also with structuring the code by separating creation logic from business logic.
Full Java implementation is less than 300 LOC of code.

https://github.com/aartiPl/SDI

Please let me know your comments and suggestions.

/Marcin

[toc] | [next] | [standalone]


#37860

FromDaniele Futtorovic <da.futt.news@laposte.net>
Date2017-12-18 18:52 +0100
Message-ID<p18va0$2c4$1@dont-email.me>
In reply to#37859
On 2017-12-18 12:44, Marcin Kuszczak wrote:
> Hi guys!
> 
> I have just released SDI - Simple Dependency Injection framework.
> It is really light and does not enforce anything on a user, does not use annotations, or any kind of XML. It helps also with structuring the code by separating creation logic from business logic.
> Full Java implementation is less than 300 LOC of code.
> 
> https://github.com/aartiPl/SDI
> 
> Please let me know your comments and suggestions.
> 
> /Marcin
> 

> SDI allows to *excessively* use Dependency Injection pattern in your application.

I don't think that says what you want it to say. You probably meant
"extensively".

Sorry, that'll be the only feedback from me for now.

-- 
DF.

[toc] | [prev] | [next] | [standalone]


#37862

FromMarcin Kuszczak <marcin.kuszczak@gmail.com>
Date2017-12-18 10:43 -0800
Message-ID<368c757c-d84e-4454-83a4-7072210c4344@googlegroups.com>
In reply to#37860
W dniu poniedziałek, 18 grudnia 2017 18:53:23 UTC+1 użytkownik Daniele Futtorovic napisał:
> On 2017-12-18 12:44, Marcin Kuszczak wrote:
> > Hi guys!
> > 
> > I have just released SDI - Simple Dependency Injection framework.
> > It is really light and does not enforce anything on a user, does not use annotations, or any kind of XML. It helps also with structuring the code by separating creation logic from business logic.
> > Full Java implementation is less than 300 LOC of code.
> > 
> > https://github.com/aartiPl/SDI
> > 
> > Please let me know your comments and suggestions.
> > 
> > /Marcin
> > 
> 
> > SDI allows to *excessively* use Dependency Injection pattern in your application.
> 
> I don't think that says what you want it to say. You probably meant
> "extensively".
> 
> Sorry, that'll be the only feedback from me for now.
> 
> -- 
> DF.

That's ok. - thanks for the correction. I am not English native speaker.

[toc] | [prev] | [next] | [standalone]


#37863

FromEric Douglas <e.d.programmer@gmail.com>
Date2017-12-18 10:46 -0800
Message-ID<f7e360eb-aa4e-4406-a980-c7e8a21a3931@googlegroups.com>
In reply to#37862
On Monday, December 18, 2017 at 1:43:49 PM UTC-5, Marcin Kuszczak wrote:
> 
> That's ok. - thanks for the correction. I am not English native speaker.

"less than 300 LOC of code"
What does LOC stand for?

[toc] | [prev] | [next] | [standalone]


#37865

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2017-12-18 13:53 -0500
Message-ID<p192r8$udl$1@dont-email.me>
In reply to#37863
On 12/18/2017 1:46 PM, Eric Douglas wrote:
> On Monday, December 18, 2017 at 1:43:49 PM UTC-5, Marcin Kuszczak wrote:
>>
>> That's ok. - thanks for the correction. I am not English native speaker.
> 
> "less than 300 LOC of code"
> What does LOC stand for?

     "Lines Of Code," according to the Department of Redundancy Dept.

-- 
esosman@comcast-dot-net.invalid
Eleven hundred twenty-nine days to go.

[toc] | [prev] | [next] | [standalone]


#37876

FromArne Vajhøj <arne@vajhoej.dk>
Date2017-12-18 19:27 -0500
Message-ID<p19md7$1adh$2@gioia.aioe.org>
In reply to#37863
On 12/18/2017 1:46 PM, Eric Douglas wrote:
> On Monday, December 18, 2017 at 1:43:49 PM UTC-5, Marcin Kuszczak wrote:
>> That's ok. - thanks for the correction. I am not English native speaker.
> 
> "less than 300 LOC of code"
> What does LOC stand for?

https://en.wikipedia.org/wiki/Source_lines_of_code

I would say that it (and its big brothers KLOC and
MLOC) are rather common in software development.

Obviously common != everywhere.

Arne

[toc] | [prev] | [next] | [standalone]


#37878

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2017-12-18 20:14 -0500
Message-ID<p19p66$17l$1@dont-email.me>
In reply to#37876
On 12/18/2017 7:27 PM, Arne Vajhøj wrote:
> On 12/18/2017 1:46 PM, Eric Douglas wrote:
>> On Monday, December 18, 2017 at 1:43:49 PM UTC-5, Marcin Kuszczak wrote:
>>> That's ok. - thanks for the correction. I am not English native speaker.
>>
>> "less than 300 LOC of code"
>> What does LOC stand for?
> 
> https://en.wikipedia.org/wiki/Source_lines_of_code
> 
> I would say that it (and its big brothers KLOC and
> MLOC) are rather common in software development.

     I think Eric Douglas' point was the silly expansion:

         "less than 300 LOC of code"

      -> "less that 300 lines of code of code"

     See also "RAID array," "ROM memory," and so on etc.

-- 
esosman@comcast-dot-net.invalid
Eleven hundred twenty-nine days to go.

[toc] | [prev] | [next] | [standalone]


#37888

Fromlewbloch@gmail.com
Date2017-12-19 11:46 -0800
Message-ID<5422165b-921c-4ad7-b2df-0c75277c3503@googlegroups.com>
In reply to#37878
On Monday, December 18, 2017 at 5:14:54 PM UTC-8, Eric Sosman wrote:
> On 12/18/2017 7:27 PM, Arne Vajhøj wrote:
> > On 12/18/2017 1:46 PM, Eric Douglas wrote:
> >> On Monday, December 18, 2017 at 1:43:49 PM UTC-5, Marcin Kuszczak wrote:
> >>> That's ok. - thanks for the correction. I am not English native speaker.
> >>
> >> "less than 300 LOC of code"
> >> What does LOC stand for?
> > 
> > https://en.wikipedia.org/wiki/Source_lines_of_code
> > 
> > I would say that it (and its big brothers KLOC and
> > MLOC) are rather common in software development.
> 
>      I think Eric Douglas' point was the silly expansion:
> 
>          "less than 300 LOC of code"
> 
>       -> "less that 300 lines of code of code"
> 
>      See also "RAID array," "ROM memory," and so on etc.

"ATM machine"

However, "D-Day", "H-hour", etc., are not redundant.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#37866

FromEric Douglas <e.d.programmer@gmail.com>
Date2017-12-18 11:16 -0800
Message-ID<7542fb97-5c19-405b-b8b4-d6fc7f24103e@googlegroups.com>
In reply to#37862
On Monday, December 18, 2017 at 1:43:49 PM UTC-5, Marcin Kuszczak wrote:
> 
> That's ok. - thanks for the correction. I am not English native speaker.

That is apparent from the many grammatical errors, which I expect from anyone having English as a second language.  The spelling errors are more annoying, you misspelled parameterized a couple times.  I believe English is the easiest language to learn and the hardest to master.  I'm just glad we don't have to learn the gender of every inanimate object.

So anyway, this is "yet another framework"? Is it to use on top of another framework, or as a replacement, and how would it be better than any other framework out there?  I believe Spring is the most popular framework.  I've just written all my own Java, thus far not using any frameworks as far as I know.

[toc] | [prev] | [next] | [standalone]


#37867

FromKiwi User <martin@mydomain.invalid>
Date2017-12-18 19:47 +0000
Message-ID<p195vr$1p3$1@news.albasani.net>
In reply to#37866
On Mon, 18 Dec 2017 11:16:36 -0800, Eric Douglas wrote:

> you misspelled parameterized a couple times.
>
I could say the same to you: -ised word endings are perfectly correct on 
this side of the pond. Using -ized is American usage, not Queen's 
English. Similarly, spelling 'sulphur' with an 'f' looks very wrong to 
me. I don't know when or why these divergences happened, but the result 
is that there are multiple legitimate spellings for some English words 
and the better spell checkers will accept both or, preferably, default to 
using the appropriate dictionary depending on your system's time zone.


-- 
Martin    | martin at
Gregorie  | gregorie
          | dot org

[toc] | [prev] | [next] | [standalone]


#37868

FromEric Douglas <e.d.programmer@gmail.com>
Date2017-12-18 12:35 -0800
Message-ID<7655c9ff-4253-409c-bafc-55f0be9385ea@googlegroups.com>
In reply to#37867
On Monday, December 18, 2017 at 2:47:27 PM UTC-5, Kiwi User wrote:
> 
> > you misspelled parameterized a couple times.
> >
> I could say the same to you: -ised word endings are perfectly correct on 
> this side of the pond. Using -ized is American usage, not Queen's 
> English. Similarly, spelling 'sulphur' with an 'f' looks very wrong to 
> me. I don't know when or why these divergences happened, but the result 
> is that there are multiple legitimate spellings for some English words 
> and the better spell checkers will accept both or, preferably, default to 
> using the appropriate dictionary depending on your system's time zone.
> 

Not sure what you mean, parameterize is a correct spelling.
http://www.dictionary.com/browse/parameterize
He spelled it parametrize.

[toc] | [prev] | [next] | [standalone]


#37872

FromKiwi User <martin@mydomain.invalid>
Date2017-12-18 21:48 +0000
Message-ID<p19d3m$ab1$1@news.albasani.net>
In reply to#37868
On Mon, 18 Dec 2017 12:35:28 -0800, Eric Douglas wrote:

> On Monday, December 18, 2017 at 2:47:27 PM UTC-5, Kiwi User wrote:
>> 
>> > you misspelled parameterized a couple times.
>> >
>> I could say the same to you: -ised word endings are perfectly correct
>> on this side of the pond. Using -ized is American usage, not Queen's
>> English. Similarly, spelling 'sulphur' with an 'f' looks very wrong to
>> me. I don't know when or why these divergences happened, but the result
>> is that there are multiple legitimate spellings for some English words
>> and the better spell checkers will accept both or, preferably, default
>> to using the appropriate dictionary depending on your system's time
>> zone.
>> 
>> 
> Not sure what you mean, parameterize is a correct spelling.
> http://www.dictionary.com/browse/parameterize He spelled it parametrize.

Understood. I thought you meant he'd written 'parameterise' somewhere I 
can't see without going to look at his site.
 
But minor correction 'parameterize' may be correct in the USA and its 
colonies but 'parameterise' is preferred in the UK and its associated 
(ex-?)commonwealth countries. Many country-specific dictionaries will 
reflect this. Ditto sulphur/sulfur and colour/color.


-- 
Martin    | martin at
Gregorie  | gregorie
          | dot org

[toc] | [prev] | [next] | [standalone]


#37873

FromEric Douglas <e.d.programmer@gmail.com>
Date2017-12-18 13:56 -0800
Message-ID<fbad876c-9d4d-4d16-9e4f-3ead08a7b9b9@googlegroups.com>
In reply to#37872
On Monday, December 18, 2017 at 4:48:56 PM UTC-5, Kiwi User wrote:
> Understood. I thought you meant he'd written 'parameterise' somewhere I 
> can't see without going to look at his site.
>  
> But minor correction 'parameterize' may be correct in the USA and its 
> colonies but 'parameterise' is preferred in the UK and its associated 
> (ex-?)commonwealth countries. Many country-specific dictionaries will 
> reflect this. Ditto sulphur/sulfur and colour/color.
> 

There is no king's English here, we don't put u in our colors, I'll give you a z or an s but leave out an e and it looks bad.

[toc] | [prev] | [next] | [standalone]


#37874

FromKiwi User <martin@mydomain.invalid>
Date2017-12-18 23:16 +0000
Message-ID<p19i87$4fi$1@news.albasani.net>
In reply to#37873
On Mon, 18 Dec 2017 13:56:20 -0800, Eric Douglas wrote:

> On Monday, December 18, 2017 at 4:48:56 PM UTC-5, Kiwi User wrote:
>> Understood. I thought you meant he'd written 'parameterise' somewhere I
>> can't see without going to look at his site.
>>  
>> But minor correction 'parameterize' may be correct in the USA and its
>> colonies but 'parameterise' is preferred in the UK and its associated
>> (ex-?)commonwealth countries. Many country-specific dictionaries will
>> reflect this. Ditto sulphur/sulfur and colour/color.
>> 
>> 
> There is no king's English here,
None here either - at present.

> we don't put u in our colors,
>
This whole word shortening deal (o not ou, f not ph) looks systematic 
enough to have been imposed by somebody. Do you know when it happened and 
who was behind the change?
 
> I'll give you a z or an s but leave out an e and it looks bad.
>
Of course - anything that doesn't match any spelling scheme is obviously 
wrong, but can be hard to catch: not many IDEs provide a spell checker 
comments. For that matter, if you use a plain text or HTML editor for 
documentation then you probably don't have a spell checker either (and 
I've never seen reasonable HTML emitted by a work processor).

All this makes spelling or grammatical mistakes rather hard to spot, so 
cut the guy some slack as a non-native English speaker.


-- 
Martin    | martin at
Gregorie  | gregorie
          | dot org

[toc] | [prev] | [next] | [standalone]


#37875

FromArne Vajhøj <arne@vajhoej.dk>
Date2017-12-18 19:24 -0500
Message-ID<p19m8q$1adh$1@gioia.aioe.org>
In reply to#37867
On 12/18/2017 2:47 PM, Kiwi User wrote:
> On Mon, 18 Dec 2017 11:16:36 -0800, Eric Douglas wrote:
>> you misspelled parameterized a couple times.
>>
> I could say the same to you: -ised word endings are perfectly correct on
> this side of the pond. Using -ized is American usage, not Queen's
> English. Similarly, spelling 'sulphur' with an 'f' looks very wrong to
> me. I don't know when or why these divergences happened, but the result
> is that there are multiple legitimate spellings for some English words
> and the better spell checkers will accept both or, preferably, default to
> using the appropriate dictionary depending on your system's time zone.

A classic is:

http://codingstill.com/2011/08/if-php-were-british/

Arne

[toc] | [prev] | [next] | [standalone]


#37877

FromKiwi User <martin@mydomain.invalid>
Date2017-12-19 00:46 +0000
Message-ID<p19nh0$keu$1@news.albasani.net>
In reply to#37875
On Mon, 18 Dec 2017 19:24:59 -0500, Arne Vajhøj wrote:

> A classic is:
> 
> http://codingstill.com/2011/08/if-php-were-british/
> 
I hadn't seen this before. Brilliant!


-- 
Martin    | martin at
Gregorie  | gregorie
          | dot org

[toc] | [prev] | [next] | [standalone]


#37870

FromMarcin Kuszczak <marcin.kuszczak@gmail.com>
Date2017-12-18 13:22 -0800
Message-ID<7b720a52-a95d-4330-a295-44a4033b9856@googlegroups.com>
In reply to#37866
> So anyway, this is "yet another framework"? Is it to use on top of another framework, or as a replacement, and how would it be better than any other framework out there?  I believe Spring is the most popular framework.  I've just written all my own Java, thus far not using any frameworks as far as I know.

It's a replacement and it does not need any other framework. I don't like frameworks (also?), so you can think about it as library or utility. I have deliberately written "micro-framework", as it does impose a very little on a user.
I have used it successfully in micro-services but did not test it on big, monolithic application, so it is hard to say if it will suffice for such an approach. Anyway, I will consider implementing only simple improvements, so it will not eventually transform to the heavyweight framework as Spring.

[toc] | [prev] | [next] | [standalone]


#37871

FromEric Douglas <e.d.programmer@gmail.com>
Date2017-12-18 13:29 -0800
Message-ID<b1a092a7-0d9f-4c10-85fb-2e7e01831bfa@googlegroups.com>
In reply to#37870
On Monday, December 18, 2017 at 4:22:59 PM UTC-5, Marcin Kuszczak wrote:
> It's a replacement and it does not need any other framework. I don't like frameworks (also?), so you can think about it as library or utility. I have deliberately written "micro-framework", as it does impose a very little on a user.
> I have used it successfully in micro-services but did not test it on big, monolithic application, so it is hard to say if it will suffice for such an approach. Anyway, I will consider implementing only simple improvements, so it will not eventually transform to the heavyweight framework as Spring.

I wrote my own API for our in house application.  I don't know what defines a framework exactly so I may have written one.  Spring sounds like a lot of overhead to me.  I've just always wanted to learn it because I've seen it in so many job ads.  I think what I've written is pretty efficient though our normal use is a relatively small dataset.

[toc] | [prev] | [next] | [standalone]


#37880

FromEric Douglas <e.d.programmer@gmail.com>
Date2017-12-19 08:24 -0800
Message-ID<f51207db-e668-4b4d-978b-4ee0048b6a88@googlegroups.com>
In reply to#37859
On Monday, December 18, 2017 at 6:44:35 AM UTC-5, Marcin Kuszczak wrote:
> Hi guys!
> 
> I have just released SDI - Simple Dependency Injection framework.
> It is really light and does not enforce anything on a user, does not use annotations, or any kind of XML. It helps also with structuring the code by separating creation logic from business logic.
> Full Java implementation is less than 300 LOC of code.
> 
> https://github.com/aartiPl/SDI
> 
> Please let me know your comments and suggestions.
> 
> /Marcin

If you're developing something completely new you might want to check if someone else already invented that wheel.  This seems like a good place to start.
https://github.com/facebook

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web