94.23.238.222: Comment provided by Yeye - via ArticleComments extension - 2013-10-23 09:33:36

Comment provided by Yeye - via ArticleComments extension

←Older revision Revision as of 09:33, 23 October 2013
Line 137: Line 137:
--Aneri 16:53, 21 October 2013 (CEST)
--Aneri 16:53, 21 October 2013 (CEST)
 +
</div>
 +
== Yeye said ... ==
 +
 +
<div class='commentBlock'>
 +
Okay, I am a huge google fan and I will not, under any cnecumstaicrs, notate how ironic it was that 40 people "liked this" in Google Reader. I will also, under no cnecumstaicrs, point out how strange +1d looks. Listen Google, this is another bomb waiting to happen, like Google Buzz and like Side Wiki; please don't do it, please come up with something that people really relate too, like "cool" or "recommend" or something else, just not +1.
 +
 +
--Yeye 11:33, 23 October 2013 (CEST)
</div>
</div>

94.23.238.222: Comment provided by Aneri - via ArticleComments extension - 2013-10-21 14:53:03

Comment provided by Aneri - via ArticleComments extension

←Older revision Revision as of 14:53, 21 October 2013
Line 131: Line 131:
--[[User:JaroslavTulach|JaroslavTulach]] 13:00, 21 November 2009 (UTC)
--[[User:JaroslavTulach|JaroslavTulach]] 13:00, 21 November 2009 (UTC)
 +
== Aneri said ... ==
 +
 +
<div class='commentBlock'>
 +
I can totally aeaipcrpte the effort that Google is making to penetrate the social media sphere/crowdsourcing . There might be some traction with this latest attempt although the way it's being executed could be detrimental to the whole campaign. Just a couple of things.1: "+1" is hard to relate to. I noticed the Google has the Microsoft problem. They have brilliant engineers but they lack the coolness/connection factor. I think the coolness/connection factor is integral to the success of facebook and apple. When you use apple's and facebook's technology you feel like you connect with something deeper than the technology itself. There is a feeling associated with using the technology. For some reason it seems that Microsoft and Google don't put as much emphasis on design and how it "feels" to interact with their technology. I don't have much time so I'll get to the point I want to make. "+1" has no emotional appeal. Where in your life have you ever "+1ed"something. I like stuff all the time whether I do in internally or express it externally. +1 has no meaning outside of the Google context. So my first point has to do with what they named the technology. They could have come up with something that was already a part of the common lexicon and something a little richer . A synonym for like, Or something cool like sweet , hot , value , love . These might be a little corny but not as corny as +1 Secondly, I know they will be adding the +1 to pages on the web. They need to release that function right away. It should have been released for the pages before it was released for the SERPs. Right now it seems like Google is asking you to like how a SERP result looks. Because of how it's positioned it seems as though it's not asking how much you like the content on a page. For instance, to like something I'll have to run a query in Google. Visit the page. Rerun the query or hit the back button a couple of times and then hit the +1 button. That's a lot of work for a lazy guy like me and unfortunately I'm not getting paid by Google to do this work so instead of going back and +1ing a result I'll just continue onto my business. Great Idea. Poor Execution. Please Fix. I want you guys to stay around.
 +
 +
--Aneri 16:53, 21 October 2013 (CEST)
 +
</div>

JaroslavTulach at 13:00, 21 November 2009 - 2009-11-21 13:00:00

←Older revision Revision as of 13:00, 21 November 2009
Line 127: Line 127:
--btilford 05:53, 20 November 2009 (CET)
--btilford 05:53, 20 November 2009 (CET)
</div>
</div>
 +
 +
Thanks a lot for this example. I expect it is possible to create an [[annotation]] that would annotate a class, making bound properties from all of its methods. If so, this is exactly I was looking for.
 +
 +
--[[User:JaroslavTulach|JaroslavTulach]] 13:00, 21 November 2009 (UTC)

67.175.180.130 at 04:56, 20 November 2009 - 2009-11-20 04:56:18

←Older revision Revision as of 04:56, 20 November 2009
Line 120: Line 120:
@BoundProp
@BoundProp
void setSomething(Object singleArg) {...}
void setSomething(Object singleArg) {...}
 +
PropertyChangeSupport pcs = new PropertyChangeSupport()
 +
public PropertyChangeSupport getPropertyChangeSupport(){return pcs;}
}
}
</source>
</source>

67.175.180.130: Comment provided by btilford - via ArticleComments extension - 2009-11-20 04:53:36

Comment provided by btilford - via ArticleComments extension

←Older revision Revision as of 04:53, 20 November 2009
Line 40: Line 40:
--[[User:JaroslavTulach|JaroslavTulach]] 08:46, 19 November 2009 (UTC)
--[[User:JaroslavTulach|JaroslavTulach]] 08:46, 19 November 2009 (UTC)
 +
== btilford said ... ==
 +
 +
<div class='commentBlock'>
 +
I did a pretty bad job explaining how it works... ;)
 +
 +
So basically someone could create a library with an annotation and an "Aspect"
 +
<source lang="java">
 +
@Inherited
 +
@Documented
 +
@Target(ElementType.METHOD)
 +
@Retention(RetentionPolicy.RUNTIME)
 +
public @interface BoundProp {
 +
String value();
 +
}
 +
</source>
 +
<source lang="java">
 +
@Aspect
 +
@Component
 +
public class BoundPropertyAspect {
 +
 +
private static final String SETTER = "^set";
 +
//execution(public * *(..))
 +
@Around(
 +
"@annotation(test.BoundProp) && execution(public * *..*.set*(*))")
 +
private void propertyChanged(ProceedingJoinPoint joinPoint) {
 +
Logger.getLogger(getClass().getName()).info("Advice propertyChanged");
 +
 +
SourceLocation source = joinPoint.getSourceLocation();
 +
// Logger.getLogger(getClass().getName()).info("\tSource: " + source.getFileName() + " (" + source.getLine() + ")");
 +
 +
Object owner = joinPoint.getTarget();
 +
Logger.getLogger(getClass().getName()).info("\tOwner: " + owner.getClass().getName());
 +
 +
Object newValue = joinPoint.getArgs()[0];
 +
Logger.getLogger(getClass().getName()).info("\tnewValue: " + newValue.toString());
 +
 +
 +
String setter = joinPoint.getSignature().getName();
 +
Logger.getLogger(getClass().getName()).info("\tmethodName: " + setter);
 +
 +
 +
PropertyChangeSupport pcs = null;
 +
 +
Object old = null;
 +
try {
 +
old =
 +
owner.getClass().getMethod(
 +
setter.replaceFirst(SETTER, "get")).invoke(owner);
 +
pcs =
 +
(PropertyChangeSupport) owner.getClass().getMethod(
 +
"getPropertyChangeSupport").invoke(owner);
 +
 +
} catch (Throwable ex) {
 +
Logger.getLogger(BoundPropertyAspect.class.getName()).log(
 +
Level.SEVERE,
 +
null, ex);
 +
} finally {
 +
try {
 +
joinPoint.proceed();
 +
} catch (Throwable ex) {
 +
Logger.getLogger(BoundPropertyAspect.class.getName()).log(
 +
Level.SEVERE,
 +
null, ex);
 +
}
 +
}
 +
if (pcs != null) {
 +
pcs.firePropertyChange(setter.replaceFirst(SETTER, ""), old,
 +
newValue);
 +
}
 +
 +
 +
}
 +
}
 +
</source>
 +
 +
Then that aspect could be "triggered" by annotating a method with the @BoundProp annotation
 +
<source lang="java">
 +
class SomeClass {
 +
@BoundProp
 +
void setSomething(Object singleArg) {...}
 +
}
 +
</source>
 +
 +
--btilford 05:53, 20 November 2009 (CET)
 +
</div>

JaroslavTulach at 08:51, 19 November 2009 - 2009-11-19 08:51:04

←Older revision Revision as of 08:51, 19 November 2009
Line 11: Line 11:
--NicolasDumoulin 13:00, 13 November 2009 (CET)
--NicolasDumoulin 13:00, 13 November 2009 (CET)
</div>
</div>
 +
 +
Well, Nicolas, you are able to debug [[Netigso]], so you cannot be counted into the target group that can practise only [[cluelessness|empiristic programming]] and needs as much simplicity as possible. But I agree that with [[Maven]] the compile time configuration is much more simplified than I have envisioned.
 +
 +
--[[User:JaroslavTulach|JaroslavTulach]] 08:51, 19 November 2009 (UTC)
 +
== btilford said ... ==
== btilford said ... ==

JaroslavTulach at 08:46, 19 November 2009 - 2009-11-19 08:46:12

←Older revision Revision as of 08:46, 19 November 2009
Line 17: Line 17:
e.g.
e.g.
 +
<source lang="java">
@Around("@annotation(com.mycompany.BoundProp)")
@Around("@annotation(com.mycompany.BoundProp)")
 +
</source>
would match all methods annotated with @com.mycompany.BoundProp
would match all methods annotated with @com.mycompany.BoundProp
and you could still say only setters with 1 argument should be bound (since it might make sense to do that)
and you could still say only setters with 1 argument should be bound (since it might make sense to do that)
 +
<source lang="java">
@Around("@annotation(com.mycompany.BoundProp) && execution(public * *..*.set*(*))")
@Around("@annotation(com.mycompany.BoundProp) && execution(public * *..*.set*(*))")
 +
</source>
--btilford 01:45, 19 November 2009 (CET)
--btilford 01:45, 19 November 2009 (CET)
</div>
</div>
 +
 +
Thanks for your comment btilford. I did not know this. Still, this is slightly opposite approach. The end user still needs to deal with aspect and with meaning of ''@Around'' and pointcut ''public * *..*.set*(*))'' and setup the AspectJ compiler. I'm seeking for the possite: The user downloads library with ''com.mycompany.BoundProp'' annotations, applies the annotation to one of its classes and as a result all the setters in the class will become bounded. This is not big shift technologically, I guess, but huge improvement in ease of use. Not talking about the fact that it opens the door to create a market of reusable aspects.
 +
 +
--[[User:JaroslavTulach|JaroslavTulach]] 08:46, 19 November 2009 (UTC)

67.175.180.130: Comment provided by btilford - via ArticleComments extension - 2009-11-19 00:45:37

Comment provided by btilford - via ArticleComments extension

←Older revision Revision as of 00:45, 19 November 2009
Line 10: Line 10:
--NicolasDumoulin 13:00, 13 November 2009 (CET)
--NicolasDumoulin 13:00, 13 November 2009 (CET)
 +
</div>
 +
== btilford said ... ==
 +
 +
<div class='commentBlock'>
 +
AspectJ supports annotations pretty well plus you still have all the old methods of defining a pointcut (or combination) if you need to really specific.
 +
 +
e.g.
 +
@Around("@annotation(com.mycompany.BoundProp)")
 +
 +
would match all methods annotated with @com.mycompany.BoundProp
 +
 +
and you could still say only setters with 1 argument should be bound (since it might make sense to do that)
 +
@Around("@annotation(com.mycompany.BoundProp) && execution(public * *..*.set*(*))")
 +
 +
 +
--btilford 01:45, 19 November 2009 (CET)
</div>
</div>

195.221.117.51: Comment provided by NicolasDumoulin - via ArticleComments extension - 2009-11-13 12:00:27

Comment provided by NicolasDumoulin - via ArticleComments extension

New page

<noinclude>Comments on [[AOP]]
<comments />
----- __NOEDITSECTION__</noinclude>

== NicolasDumoulin said ... ==

<div class='commentBlock'>
We use aspectj for defining and using an aspect that serve an automatic objects caching service. It's not so hard, you can see our notes here:
http://www.simexplorer.org/wiki/DevDoc/AspectJ

--NicolasDumoulin 13:00, 13 November 2009 (CET)
</div>