[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
Gephi forumsPlease post new questions on facebook group too (https://www.facebook.com/groups/gephi) 2016-08-12T13:40:02+01:00 https://forum-gephi.org/app.php/feed/topic/5332 2016-08-12T13:40:02+01:002016-08-12T13:40:02+01:00 https://forum-gephi.org/viewtopic.php?t=5332&p=13034#p13034 <![CDATA[Re: Question on the use of Lookup]]> 'Lookup' is one of mechanisms of Netbeans Platform, that helps modules to get their dependencies. Instead of creating some objects (like ProjectController) by yourself (with 'new ...') you just saying 'Give me ready instance of ProjectController' in code like:
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);

The best and short description of this tool I saw in the next cheatsheet:
https://dzone.com/refcardz/netbeans-platform-70

This mechanism saves developer of new modules from handy creating or long searching of heavy objects, because logic of their lifecycle can be very complex, but it isn't interesting for developer, he just needs object with its api :) For example, may be it's wrong to have 2 ProjectControllers in application - Lookup will find existed instance and give it to us.

This pattern is one of implementations of 'Inversion of control' design principle.

Please correct me if I said something wrong)

Statistics:Posted by Alarmwolf — 12 Aug 2016 13:40


]]>
2016-07-11T15:43:37+01:002016-07-11T15:43:37+01:00 https://forum-gephi.org/viewtopic.php?t=5332&p=12824#p12824 <![CDATA[Question on the use of Lookup]]> Statistics:Posted by littleBobbyTables — 11 Jul 2016 15:43


]]>