using java

search for more blogs here

 

"Infinite Streams using Java Closures" posted by ~Ray
Posted on 2008-11-13 12:15:33

Neal Gafter's of the closures implementation in Java has given us enough playground to fool around with. Of late. I have been around with a couple of idioms in functional programming trying to implement it in Java. Many of them have already been tried using anonymous inner classes and the likes. Many of them work too but at the cost of high. The following is an attempt to get a clear implementation of infinite streams in Java. Infinite streams give you the illusion that it can contain infinite number of objects. The real kludge behind infinite streams is lazy evaluation introduces the term delayed evaluation which enables us to represent very large (even infinite) sequences as streams Functional languages like Haskell and Miranda employs laziness as the default paradigm of evaluation while languages like Scheme implement the same concepts as library functions (delay and force). Dominik Gruntz infinite streams in Java using the functor paradigm and inner classes. The obvious problem is verbosity resulting from the accidental complexity that they lend to the implementation. In this post. I attempt the same using Neal's closures prototype. So without further ado.. The Stream InterfaceHere's the contract for lazy evaluation.. class StreamTest { interface Stream<E> { E car(); Stream<E> cdr(); E get(int index); <R> Stream<R> map(Unary<? super E. R> f); Stream<E> filter(Unary<? super E. Boolean> f); } //..} class StreamTest { interface Stream<E> { //. as above } static class LazyStream<E> implements Stream<E> { private E car; private {=>Stream<E>} cdr; // constructor public LazyStream(E car. {=>Stream<E>} cdr) { this car = car; this cdr = cdr; } // accessors public E car() { return car; } public Stream<E> cdr() { return cdr invoke(); } // access at position public E get(int index) { Stream<E> stream = this; while (index-- > 0) { stream = stream cdr(); } return stream car(); } // map over the stream public <R> Stream<R> map(Unary<? super E. R> f) { return cons(f invoke(car). {=>cdr() map(f)}); } // filter the stream public Stream<E> filter(Unary<? super E. Boolean> f) { if (car() != null) { if (f invoke(car()) == true) { return cons(car(). {=>cdr() filter(f)}); } else { return cdr() filter(f); } } return null; } // factory method cons public static <E> LazyStream<E> cons(E val. {=>Stream<E>} c) { return new LazyStream<E>(val c); } }} class StreamTest { //. all above stuff //. and the tests // helper function generating sequence of natural numbers static LazyStream<Integer> integersFrom(final int start) { return LazyStream cons(start. {=>integersFrom(start+1)}); } // helper function for generating fibonacci sequence static LazyStream<Integer> fibonacci(final int a final int b) { return LazyStream cons(a. {=>fibonacci(b a+b)}); } public static void main(String[] args) { // natural numbers Stream<Integer> integers = integersFrom(0); Stream<Integer> s = integers; for(int i=0; i<20; i++) { System out print(s car() + " "); s = s cdr(); } System out println("..."); // a map example over the stream Stream<Integer> t = integers; Stream<Integer> u = t map(new Unary<Integer. Integer>({Integer i=>i*i})); for(int i=0; i<20; i++) { System out print(u car() + " "); u = u cdr(); } System out println("..."); // a filter over stream Stream<Integer> x = integers; Stream<Integer> y = x filter(new Unary<Integer. Boolean>({Integer i=>i%2==0})); for(int i=0; i<20; i++) { System out print(y car() + " "); y = y cdr(); } System out println("..."); }} Closures in Java will surely bring in a new paradigm of programming within the developers. The amount of excitement that the prototype has already generated is phenomenal. It'll be too bad if they do not appear in Java 7. Update: Ricky Clarkson points out in the Comments that And here's my 'answer': http://pastebin com/f5e4fd1abIn short because {A=>B} can be read as {? super A=>? extends B} you don't need to add it yourself. All I did was delete Unary and replace it with straight {A=>B}. Perhaps I missed something but the code compiles and runs fine. If I missed something add a test case that fails and I'll try again. Silly me ! It just blew off me that {? super E=>? extends R} is the same as {E=>R}. Thanks for reminding me. I would have required the indirection in case I had an extends on the left hand side. I am not changing the post - just adding an Update on the changes. Thanks for the comment. Good post debasish. But can you please help me out most of my programs in closures won't run in windowsXP?I always getC:\closures\test\tools\javac\closures>java -Xbootclasspath/p:c:/closures/lib/javac jar StreamTestException in thread "main" java lang. NoClassDefFoundError: javax/lang/function/OOC:\closures\test\tools\javac\closures>I could manage only very few closure examples to run. ThanksPrashant jalasutramhttp://prashantjalasutram blogspot com/ Prashant:What command are you using to compile? If you're not specifying the classpath on that command what value does %CLASSPATH% have?When you compile some classes are created. For me a javax/ directory appears in the same directory my class file appears in (assuming no package statement in the source). You'll need to make sure that the directory above javax/ is on the classpath. I think this is only a prototype issue and that in a release the types will be generated by the VM as needed much as array types are. Ricky,I cannot see any folders getting created when it compiles successfully. Command i am using:C:\closures\test\tools\javac\closures>javac -J-Xbootclasspath/p:c:/closures/lib/javac jar -source 7 Demo javaand then i try to run but fail almost all the times likejava -Xbootclasspath/p:c:/closures/lib/javac jar DemoThanksPrashant Ricky,Thanks a lot for your gr8 tip and yes it worked finally and i am very happy that i can try a lot of examples now. It worked when i added "-d." which allowed as you suggested to create a new directory and added OO class so finally my javac looks likejavac -d. -J-Xbootclasspath/p:c:/closures/lib/javac jar -source 7 * javaand running in XP does not change any thing. Debasish thanks a lot for allowing to act as mediator pattern between me and ricky to solve this :-)ThanksPrashant Jalasutram Hi Prashant -It is good to find that ur problems have been fixed. I just now logged in and found the trail from Prashant. Thanks Ricky for all the help. Closures indeed provide great power of abstractions. I will be extremely disappointed if we miss it out in Java 7. Cheers. 情報サイトには、魅力的なお仕事をたくさん掲載しています。お仕事をお探しの皆さまにとって、より使いやすく便利なサイトにするべく、アデコ情報サイトをリニューアルしました。 「することによって絶対的な美を得られるわけではありません。『自分は変わった』という事実を物理的に確認することで、気になって仕方がなかった自分 の体に対するコンプレックスから解放される。そこではじめて心を研ぎ澄まし、自分の内面を磨いていくことができるようになるのです。そうして人は美しく なっていく。外見だけ磨こうとする人は美しくなれない、というのが私の持論です」 広島,岡山/四国(香川,徳島,愛媛,高知) -あなぶき不産ナビ四国4県、岡山の不動産、広島の不動産など不動産情報検索(マンション・一戸建て・土地・収益物件等)サイトです。穴吹不動産流通株式会社"

Forex Groups - Tips on Trading

Related article:
http://debasishg.blogspot.com/2007/11/infinite-streams-using-java-closures.html

comments | Add comment | Report as Spam


"depreciation code, can't seem to output using for loop" posted by ~Ray
Posted on 2008-03-12 23:06:27

Hi i'm having trouble trying to output my string using a for circle i'm not sure if i'm doing it right or if i'm missing something if someone could help me out a little it would be greatly appreciated. Basically what i'm trying to do is find out the depreication evaluate of an asset worth 20000 over 10 years and display it year after year thank you amountDepre totalValue; amountDepre = ascertain / demoninator; totalDepre = totalDepre + amountDepre; totalValue = amount - amountDepre; s = s + years + mike71484 wrote:Hi i'm having trouble trying to output my arrange using a for loop i'm not sure if i'm doing it alter or if i'm missing something if someone could help me out a little it would be greatly appreciated. Basically what i'm trying to do is find out the depreication rate of an asset worth 20000 over 10 years and display it year after year thank you Is the air A) that it's simply not displaying anything at all or B) that it's not displaying what you're expecting?First glance. I evaluate your for loop logic is messed up; dress your >= (greater than or equal to) to a <= (less than or equal to) and you should get dramatically different create. =)You might also want to change the way your arrange s is formatted.. when it does create information a user really couldn't alter heads or tails of what it means; put some evince labels in there or something. just a thought. It also helps with debugging. Also you undergo the do by write of slash on your newline characters: /n should be \n. If you try /n in this manner it will simply print the characters /n. Hope that helps. ThokEdited by: Thok on Nov 16. 2007 1:13 PM Thank you i think i got it running. i'm new to java so i make a lot of stupid mistakes i just need to get used to it.. thanks a lot I acknowledge it mike71484 wrote:Thank you i evaluate i got it running. i'm new to java so i make a lot of stupid mistakes i just need to get used to it.. thanks a lot I appreciate it Unless otherwise licensed label in all technical manuals herein (including articles. FAQs samples) is provided under this.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237495

comments | Add comment | Report as Spam


"depreciation code, can't seem to output using for loop" posted by ~Ray
Posted on 2008-03-12 23:06:27

Hi i'm having affect trying to output my string using a for loop i'm not sure if i'm doing it alter or if i'm missing something if someone could help me out a little it would be greatly appreciated. Basically what i'm trying to do is sight out the depreication rate of an asset worth 20000 over 10 years and display it year after year thank you amountDepre totalValue; amountDepre = count / demoninator; totalDepre = totalDepre + amountDepre; totalValue = amount - amountDepre; s = s + years + mike71484 wrote:Hi i'm having trouble trying to create my string using a for loop i'm not sure if i'm doing it alter or if i'm missing something if someone could back up me out a little it would be greatly appreciated. Basically what i'm trying to do is sight out the depreication rate of an asset worth 20000 over 10 years and display it year after year convey you Is the issue A) that it's simply not displaying anything at all or B) that it's not displaying what you're expecting?First glance. I evaluate your for loop logic is messed up; dress your >= (greater than or equal to) to a <= (less than or equal to) and you should get dramatically different output. =)You might also want to change the way your arrange s is formatted.. when it does create information a user really couldn't alter heads or tails of what it means; put some word labels in there or something. just a thought. It also helps with debugging. Also you undergo the wrong write of slash on your newline characters: /n should be \n. If you try /n in this manner it ordain simply print the characters /n. Hope that helps. ThokEdited by: Thok on Nov 16. 2007 1:13 PM Thank you i think i got it running. i'm new to java so i make a lot of stupid mistakes i just need to get used to it.. thanks a lot I appreciate it mike71484 wrote:Thank you i think i got it running. i'm new to java so i make a lot of stupid mistakes i just need to get used to it.. thanks a lot I appreciate it Unless otherwise licensed code in all technical manuals herein (including articles. FAQs samples) is provided under this.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5237495

comments | Add comment | Report as Spam


"regular Expressions + using them in Vector analysis" posted by ~Ray
Posted on 2008-01-01 21:12:08

First don't use Vector. Use ArrayList. Second why are you storing these in a list rather than a single String?Finally of cover it doesn't work. Where in Vector's indexOf() docs does it say anything about regex? well the code I posted above should conform to only as an illustration of my problem. ActualIy I have a clump of those sequences in an Arraylist.. it can be from 5 - 100 sequences(vectors) and I need to use some methods which are available only for Collections (frequency() insertElementAt().. etc.). I am not a proffesional programmer so I do hope that I am using it correctly instead of "simple" String[][] BunchOfSequences = {seq1,seq2,...}Is it possible to use regular expressions to find a first occurence of a "a-z"(or "A-Z". it doesnt matter) in a vector then? Or I just need to find it in a "for circle"?thxadam mAdam wrote:well the code I posted above should conform to only as an illustration of my problem. ActualIy I have a bunch of those sequences in an Arraylist.. it can be from 5 - 100 sequences(vectors) and I need to use some methods which are available only for Collections (frequency() insertElementAt().. etc.). I am not a proffesional programmer so I do hope that I am using it correctly instead of "simple" String[][] BunchOfSequences = {seq1,seq2,...} I am not aware of any frequency() or insertElementAt() methods in one of Java's collection classes. Is it possible to use regular expressions to find a first occurence of a "a-z"(or "A-Z". it doesnt matter) in a vector then? Or I just need to find it in a "for loop"? thx adam Regexes only work on Strings not on collections holding Strings. So yes you will need to use a for statement (or similar). to: prometeuzz:Collections frequency() can be used for counting how many occurences of certain element there is in the collection... so I will use "for loop" then... thanks for your answer mAdam wrote:to: prometeuzz: Collections frequency() can be used for counting how many occurences of certain element there is in the collection.... Yes. I experience the meaning of the word frequency. But by writing Collections frequency() you suggest that there is such a method in the java util. Collections class which there isn't. That was my point. mAdam wrote:prometheuzz:analyse this:http://www asciiarmor com/2004/12/11/2-new-javautilcollections-methods-in-jdk-15/ Well I'll be damned! I looked at the Java docs for 1.4.2!Thanks for the link.; ) Dingo: Oh wicked wicked Zoot. Oh she is a naughty person and she must pay the penalty.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5236965

comments | Add comment | Report as Spam


"Context aware Programming using Java" posted by ~Ray
Posted on 2007-12-15 14:59:54

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <have in mind> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Forex Groups - Tips on Trading

Related article:
http://yuhanaresearch.wordpress.com/2007/11/04/context-aware-programming-using-java/

comments | Add comment | Report as Spam


"Building a WebSite Using Java?" posted by ~Ray
Posted on 2007-12-09 13:32:01

Here is a question that I have been pondering on and off for quite a while: Why do "alter kids" decide Ruby or PHP to create websites instead of Java?I undergo to admit that I do not have an answer. Why do I change surface care? Because I am a Java developer. desire many Java developers. I get along with Java come up. Not only the language itself but the development environments (brood for example) step-by-step debugging helper wide availability of libraries and code snippets and the readily accessible information on almost any technical challenge I may have on Java via explore. measure but not least. I go to JavaOne and see 10,000 people that talk and walk just desire me. The other cerebrate that I ponder this question is that the power of Java is a ameliorate fit for the areas where websites may need more than markups or scripting such as middleware logic. PHP and Ruby etc are cool for building pages but they are not ideal candidates for building middleware logic. Given that Java covers the "high end" of the spectrum come up (where sophisticated processing is needed) wouldn't it be great to use Java all the way? Is it Java as a programming language too difficult to use comparing with those scripting oriented interpreted languages? Yes this maybe the reason. But there are 5 million Java developers out there already and millions of developers alter a living by write server side Java label. A lot of websites are built by these Java developers and somehow they decide to use PHP or Ruby instead. Why? It is even more puzzling that I have seen quite a few Enterprise Java populate decided against Java - when they decided to create their web 2.0 place they went for PHP change surface though they have to hit the books PHP. Is it the lack of tooling? I evaluate there are more tools for Java than say. Ruby. Is it the lack of frameworks? I bet there are more Java frameworks than the population in China. OK a lot of websites are fairly simple mainly composed of markup pages scripts and some lightweight logic on the server align where PHP and Ruby are good for. Java maybe an overkill for such websites. But there are a lot of websites that are much more sophisticated than "lightweight" logic on the server side. For example. FaceBook was relatively simple initially but now with FaceBook API and Platform its complexity is growing. Why not use Java for such websites? So what is missing from the Java world? What is the ideal architecture to build a website using Java? This post is published on Web2 Journal (http://www web2journal com/read/457324 htm) and stirred a lot of discussions:#26 Paul Sundling commented on the 10 Nov 2007One of the big problems with this article is that it only lists 3 Java options all of which are lacking. The answer that is alter to me is Velocity and Spring MVC. For the most move you just to hit the books SimpleFormController and Velocity templates which is even more basic than PHP. If there is a team working on the communicate this ordain well with alter separation. For the most part the front end developer doesn't need to know much with all the business logic on the back end align. The hardest move is to get the initial configuration going and you can do that by using AppFuse.#25 Alexei commented on the 9 Nov 2007Wow. where to mouth. I evaluate one of the key problems with Java is the sheer be of frameworks out there actually dilutes the availability of useful information for whatever path you do choose for your application. Rails is a very opinionated framework and there are clearly defined ways of doing things - this is attractive to some people. Top that off with Ruby which is a real joy to work with. I mean seriously. its a great language and if you desire terse non-verbose label. then Ruby is very appealing. This is something Java doesn't do as well. Another reason Rails is appealing for web developers is you get so much out-of-the-box. A lot of Ajax stuff is baked right in so you dont have to go outside the framework to do things like autocompletes and basic callbacks. this saves developers time and lets them prototype rapidly. PHP is appealing I think for sortof similar reasons. although its very un-opinionated.. It's a lightweight language and very quick to get stuff up and running. Although lately I've been less impressed by PHP in command.. I'm getting tired of inconsistencies in the API wierd documentation and buggy distributions. Another mention I have is about what you said about these other languages being somehow fundamentally limiting when you try to do 'tough stuff'. I'd say that's true and not true at the same time. There may not be easy ways for example to interface directly with custom hardware in Rails. but as soon as you go away to need to do that kind of stuff you can easily write those components in C++ (which you probably should anyway) and use the C libraries for rails to tie into your web application. They have great facilities for binding to external applications when you dont want to attempt something in compose. Anyway I'd be interested to hear your comments on this.#24Claude Coulombe commented on the 9 Nov 20071) Many hosting companies doesn't provide cheap support for TOMCAT and J2EE server.2) Many projects mouth small and cheap. So it's easier to start with low cost hostings and tools. After it's too late you are caught with your previous technological decisions. SOLUTION : SUN should offer cheap Java based solutions to hosting companies.#23jsloan commented on the 9 Nov 2007Your question "So what is the ideal architecture..." has already been answered by the [[visit cerebrate] Shared nothing architecture] displace. Perhaps you should rephrase your question to "Can you build the ideal web architecture with Java?"#22Don Babcock commented on the 9 Nov 2007You asked:"So what is missing from the Java world? What is the ideal architecture to build a website using Java?Easy. ColdFusion. Since CF is JAVA under the covers it offers almost seamless convert between CF tag coding for the "easy" stuff yet if you need the power of Java it is alter there at your fingertips. For example we use JRules a commercial Java rules engine for business logic. Adding to the CF server was a simple as adding a folder containing the JAR files to the server classpath. Then you just use it right from the CF environment. Most of our cater are NOT java programmers but they can easily use CF because it hails from the HTML world they started in. Those of us from the Java side can just drop in our JARS and turn as come up as alter them available to the non-Java developers via CF components. It is a beautiful marriage from a be of perspectives.#21Jim commented on the 9 Nov 20071) The purpose of the communicate should be a prominent factor in the choice of tools for execution. If your project ranges from a non-transactional content display system all the way to a mid-volume (or higher) commerce site choices about programming language can be subordinated to questions of be design and the expertise of available resources. The fact is that PHP. Perl python java etc etc can all get these jobs done to the satisfaction of clients who be projects of this coat and scope.2) If your project needs to be a high-availability fault tolerant high-volume etc etc. then the technical factors including language be to be more carfully evaluated for their supportability stability longevity standards adherence accuse tolerance blah blah blah. If your communicate is this big then these choices should be made by engineers not designers marketers or a couple of beleaguered.

Forex Groups - Tips on Trading

Related article:
http://www.coachwei.com/blog/_archives/2007/11/6/3338191.html

comments | Add comment | Report as Spam


"Building a WebSite Using Java?" posted by ~Ray
Posted on 2007-12-09 13:32:00

Here is a question that I undergo been pondering on and off for quite a while: Why do "cool kids" choose Ruby or PHP to build websites instead of Java?I undergo to admit that I do not have an say. Why do I even compassionate? Because I am a Java developer. Like many Java developers. I get along with Java come up. Not only the language itself but the development environments (Eclipse for example) step-by-step debugging helper wide availability of libraries and label snippets and the readily accessible information on almost any technical question I may have on Java via explore. Last but not least. I go to JavaOne and see 10,000 people that talk and go just like me. The other reason that I cerebrate this question is that the power of Java is a perfect fit for the areas where websites may need more than markups or scripting such as middleware logic. PHP and Ruby etc are cool for building pages but they are not ideal candidates for building middleware logic. Given that Java covers the "high end" of the spectrum well (where sophisticated processing is needed) wouldn't it be great to use Java all the way? Is it Java as a programming language too difficult to use comparing with those scripting oriented interpreted languages? Yes this maybe the cerebrate. But there are 5 million Java developers out there already and millions of developers make a living by write server side Java code. A lot of websites are built by these Java developers and somehow they decide to use PHP or Ruby instead. Why? It is even more puzzling that I undergo seen quite a few Enterprise Java people decided against Java - when they decided to build their web 2.0 site they went for PHP even though they have to hit the books PHP. Is it the lack of tooling? I think there are more tools for Java than say. Ruby. Is it the lack of frameworks? I bet there are more Java frameworks than the population in China. OK a lot of websites are fairly simple mainly composed of markup pages scripts and some lightweight logic on the server side where PHP and Ruby are good for. Java maybe an overkill for such websites. But there are a lot of websites that are much more sophisticated than "lightweight" logic on the server side. For example. FaceBook was relatively simple initially but now with FaceBook API and Platform its complexity is growing. Why not use Java for such websites? So what is missing from the Java world? What is the ideal architecture to build a website using Java? This post is published on Web2 Journal (http://www web2journal com/construe/457324 htm) and stirred a lot of discussions:#26 Paul Sundling commented on the 10 Nov 2007One of the big problems with this bind is that it only lists 3 Java options all of which are lacking. The answer that is clear to me is Velocity and Spring MVC. For the most move you just to hit the books SimpleFormController and Velocity templates which is even more basic than PHP. If there is a team working on the project this ordain well with alter separation. For the most part the front end developer doesn't need to know much with all the business logic on the back end side. The hardest move is to get the initial configuration going and you can do that by using AppFuse.#25 Alexei commented on the 9 Nov 2007Wow. where to mouth. I think one of the key problems with Java is the sheer be of frameworks out there actually dilutes the availability of useful information for whatever path you do choose for your application. Rails is a very opinionated framework and there are clearly defined ways of doing things - this is attractive to some populate. Top that off with Ruby which is a real joy to bring home the bacon with. I mean seriously. its a great language and if you desire terse non-verbose code. then Ruby is very appealing. This is something Java doesn't do as well. Another reason Rails is appealing for web developers is you get so much out-of-the-box. A lot of Ajax stuff is baked right in so you dont have to go outside the framework to do things like autocompletes and basic callbacks. this saves developers time and lets them prototype rapidly. PHP is appealing I think for sortof similar reasons. although its very un-opinionated.. It's a lightweight language and very quick to get stuff up and running. Although lately I've been less impressed by PHP in general.. I'm getting tired of inconsistencies in the API wierd documentation and buggy distributions. Another comment I have is about what you said about these other languages being somehow fundamentally limiting when you try to do 'tough cram'. I'd say that's true and not true at the same measure. There may not be easy ways for example to interface directly with custom hardware in Rails. but as soon as you start to need to do that kind of cram you can easily create verbally those components in C++ (which you probably should anyway) and use the C libraries for rails to tie into your web application. They have great facilities for binding to external applications when you dont want to act something in script. Anyway I'd be interested to hear your comments on this.#24Claude Coulombe commented on the 9 Nov 20071) Many hosting companies doesn't provide cheap give for TOMCAT and J2EE server.2) Many projects begin small and cheap. So it's easier to start with low be hostings and tools. After it's too late you are caught with your previous technological decisions. SOLUTION : SUN should offer cheap Java based solutions to hosting companies.#23jsloan commented on the 9 Nov 2007Your question "So what is the ideal architecture..." has already been answered by the [[visit link] Shared nothing architecture] displace. Perhaps you should ingeminate your challenge to "Can you create the ideal web architecture with Java?"#22Don Babcock commented on the 9 Nov 2007You asked:"So what is missing from the Java world? What is the ideal architecture to build a website using Java?Easy. ColdFusion. Since CF is JAVA under the covers it offers almost seamless transition between CF tag coding for the "easy" cram yet if you be the power of Java it is alter there at your fingertips. For example we use JRules a commercial Java rules engine for business logic. Adding to the CF server was a simple as adding a folder containing the JAR files to the server classpath. Then you just use it right from the CF environment. Most of our staff are NOT java programmers but they can easily use CF because it hails from the HTML world they started in. Those of us from the Java align can just displace in our JARS and turn as well as make them available to the non-Java developers via CF components. It is a beautiful marriage from a be of perspectives.#21Jim commented on the 9 Nov 20071) The purpose of the communicate should be a prominent calculate in the choice of tools for execution. If your project ranges from a non-transactional circumscribe show system all the way to a mid-volume (or higher) commerce site choices about programming language can be subordinated to questions of cost design and the expertise of available resources. The fact is that PHP. Perl python java etc etc can all get these jobs done to the satisfaction of clients who need projects of this coat and scope.2) If your project needs to be a high-availability accuse tolerant high-volume etc etc. then the technical factors including language need to be more carfully evaluated for their supportability stability longevity standards adherence fault tolerance blah blah blah. If your communicate is this big then these choices should be made by engineers not designers marketers or a bring together of beleaguered.

Forex Groups - Tips on Trading

Related article:
http://www.coachwei.com/blog/_archives/2007/11/6/3338191.html

comments | Add comment | Report as Spam


"Building a WebSite Using Java?" posted by ~Ray
Posted on 2007-12-09 13:31:52

Here is a question that I undergo been pondering on and off for quite a while: Why do "cool kids" choose Ruby or PHP to build websites instead of Java?I undergo to adjudge that I do not have an say. Why do I change surface care? Because I am a Java developer. Like many Java developers. I get along with Java well. Not only the language itself but the development environments (brood for example) step-by-step debugging helper wide availability of libraries and label snippets and the readily accessible information on almost any technical question I may have on Java via explore. Last but not least. I go to JavaOne and see 10,000 people that talk and walk just like me. The other reason that I ponder this question is that the power of Java is a perfect fit for the areas where websites may need more than markups or scripting such as middleware logic. PHP and Ruby etc are alter for building pages but they are not ideal candidates for building middleware logic. Given that Java covers the "high end" of the spectrum well (where sophisticated processing is needed) wouldn't it be great to use Java all the way? Is it Java as a programming language too difficult to use comparing with those scripting oriented interpreted languages? Yes this maybe the cerebrate. But there are 5 million Java developers out there already and millions of developers make a living by write server side Java label. A lot of websites are built by these Java developers and somehow they choose to use PHP or Ruby instead. Why? It is even more puzzling that I undergo seen quite a few Enterprise Java populate decided against Java - when they decided to build their web 2.0 place they went for PHP even though they undergo to learn PHP. Is it the lack of tooling? I evaluate there are more tools for Java than say. Ruby. Is it the lack of frameworks? I bet there are more Java frameworks than the population in China. OK a lot of websites are fairly simple mainly composed of markup pages scripts and some lightweight logic on the server side where PHP and Ruby are good for. Java maybe an overkill for such websites. But there are a lot of websites that are much more sophisticated than "lightweight" logic on the server align. For example. FaceBook was relatively simple initially but now with FaceBook API and Platform its complexity is growing. Why not use Java for such websites? So what is missing from the Java world? What is the ideal architecture to build a website using Java? This post is published on Web2 Journal (http://www web2journal com/read/457324 htm) and stirred a lot of discussions:#26 Paul Sundling commented on the 10 Nov 2007One of the big problems with this article is that it only lists 3 Java options all of which are lacking. The answer that is clear to me is Velocity and Spring MVC. For the most move you just to learn SimpleFormController and Velocity templates which is even more basic than PHP. If there is a team working on the project this will well with clear separation. For the most part the lie end developer doesn't need to experience much with all the business logic on the approve end align. The hardest part is to get the initial configuration going and you can do that by using AppFuse.#25 Alexei commented on the 9 Nov 2007Wow. where to begin. I think one of the key problems with Java is the sheer number of frameworks out there actually dilutes the availability of useful information for whatever path you do choose for your application. Rails is a very opinionated framework and there are clearly defined ways of doing things - this is attractive to some people. Top that off with Ruby which is a real joy to work with. I convey seriously. its a great language and if you desire terse non-verbose label. then Ruby is very appealing. This is something Java doesn't do as well. Another reason Rails is appealing for web developers is you get so much out-of-the-box. A lot of Ajax stuff is baked right in so you dont undergo to go outside the framework to do things desire autocompletes and basic callbacks. this saves developers time and lets them prototype rapidly. PHP is appealing I think for sortof similar reasons. although its very un-opinionated.. It's a lightweight language and very quick to get cram up and running. Although lately I've been less impressed by PHP in general.. I'm getting tired of inconsistencies in the API wierd documentation and buggy distributions. Another mention I have is about what you said about these other languages being somehow fundamentally limiting when you try to do 'tough cram'. I'd say that's adjust and not adjust at the same time. There may not be easy ways for example to interface directly with custom hardware in Rails. but as soon as you go away to be to do that kind of stuff you can easily write those components in C++ (which you probably should anyway) and use the C libraries for rails to tie into your web application. They undergo great facilities for binding to external applications when you dont want to attempt something in compose. Anyway I'd be interested to comprehend your comments on this.#24Claude Coulombe commented on the 9 Nov 20071) Many hosting companies doesn't provide cheap support for TOMCAT and J2EE server.2) Many projects begin small and cheap. So it's easier to start with low cost hostings and tools. After it's too late you are caught with your previous technological decisions. SOLUTION : SUN should furnish cheap Java based solutions to hosting companies.#23jsloan commented on the 9 Nov 2007Your challenge "So what is the ideal architecture..." has already been answered by the [[tour cerebrate] Shared nothing architecture] crowd. Perhaps you should ingeminate your challenge to "Can you build the ideal web architecture with Java?"#22Don Babcock commented on the 9 Nov 2007You asked:"So what is missing from the Java world? What is the ideal architecture to build a website using Java?Easy. ColdFusion. Since CF is JAVA under the covers it offers almost seamless convert between CF tag coding for the "easy" cram yet if you need the power of Java it is right there at your fingertips. For example we use JRules a commercial Java rules engine for business logic. Adding to the CF server was a simple as adding a folder containing the JAR files to the server classpath. Then you just use it alter from the CF environment. Most of our cater are NOT java programmers but they can easily use CF because it hails from the HTML world they started in. Those of us from the Java align can just displace in our JARS and roll as well as make them available to the non-Java developers via CF components. It is a beautiful marriage from a be of perspectives.#21Jim commented on the 9 Nov 20071) The intend of the project should be a prominent calculate in the choice of tools for execution. If your communicate ranges from a non-transactional content display system all the way to a mid-volume (or higher) commerce place choices about programming language can be subordinated to questions of cost design and the expertise of available resources. The fact is that PHP. Perl python java etc etc can all get these jobs done to the satisfaction of clients who be projects of this size and scope.2) If your project needs to be a high-availability fault tolerant high-volume etc etc. then the technical factors including language be to be more carfully evaluated for their supportability stability longevity standards adherence accuse tolerance blah blah blah. If your communicate is this big then these choices should be made by engineers not designers marketers or a bring together of beleaguered.

Forex Groups - Tips on Trading

Related article:
http://www.coachwei.com/blog/_archives/2007/11/6/3338191.html

comments | Add comment | Report as Spam


"Using Transmit To Backup Your Referenced Masters" posted by ~Ray
Posted on 2007-11-17 15:26:46

I’ve written in previous posts a bit about Amazon’s S3 storage function. So far I have been pretty happy with the service however the interface has left a little to be desired. I tried using JungleDisk and a backup program like Synk Pro to move my Aperture Referenced Masters to S3 but I have ran in to a number of problems with this routine. On cover it seems to work just fine. And in fact for small numbers of images it works essentially flawlessly. But one thing that Jungle plough does that has been causing me problems has to do with its method of caching files. It allows you to set a cache and then when you try to upload images JungleDisk writes whatever it can to the cache and then begins the affect of uploading. This is a nice feature theoretically in that you can stop the affect and return and begin again but it can create problems when trying to upload a large be of data. When the cache gets filled the Synk operation can get interrupted. It doesn’t always come about but on cause I undergo to start all over again. If the Synk operation gets interrupted for some reason it fails the backup and you have to try again. JungleDisk also uses a fairly interesting method of storing your files. Instead of just creating folders and files in your S3 bucket. JungleDisk creates a flattened directory structure using the folder names you act as move of the filename. It all works perfectly fine if you always use JungleDisk to interface with your S3 account but once you try and connect with some other application things can be a bit confusing. So. I am experimenting with Panic’s Transmit. Transmit has been around forever and has served as a great FTP program for me for a long time. Now that there is support for Amazon S3 I have yet another use for the fine program. What’s more is that Transmit offers additional features such as. Mac preference syncing and built in Automator actions. I set up my Amazon account and saved it as a preference. I created a new “bucket” and then made some sub-folders. I pointed to the folder of pictures I wanted to transfer and clicked adjust. I was given a number of options as to how I wanted the synching to behave and it is off and running. It seems to write the files one at a measure copying them from my network drive to the laptop and then uploading them to S3. It is going fairly slowly but seems to working without any problems. It would be really nice to eventually get everything up on S3 and then be able to just do a sync for any newly added files. This would act a really nice archive of my Master images files up on a geographically redundant server out there in the ether. Of cover an Aperture plugin might be a nice idea as well! Hint Hint…. After the first bind I tried the S3 approach as a way of backing-up Aperture data as a bound but the initial transfer was always too decrease on broadband. In the end after trying it overnight. I backed away slowly and then used Transmit and Interarchy to clear the mess of the S3 servers. Hours of playing about but ridiculously cheap at the end of the day. It's worth highlighting that Interarchy also includes S3 capability (pre-Transit) and is pretty good for managing data stored there. In the end I decided S3 was only good for smaller amounts of data (at least on broadband) and for transferring projects if they are made publich for download.

Forex Groups - Tips on Trading

Related article:
http://www.javacrawl.com/clickToItem.action?itemID=4551835&source=rss

comments | Add comment | Report as Spam


"Enterprise Java Technologies Tech Tip" posted by ~Ray
Posted on 2007-11-09 17:12:50

Welcome to the Enterprise Java Technologies Tech Tips for November 18. 2006. Here you'll get tips on using enterprise Java technologies and APIs such as those in Java Platform. Enterprise Edition (Java EE). These tips were developed using the Java EE 5 SDK. You can transfer the SDK from the. You can download the for the Using Java Persistence With JavaServer Faces Technology tip. You can transfer the for the Using a copy Facadetip. Any use of this label and/or information below is subject to the. See the bid/Unsubscribe say at the end of this newsletter to bid to Tech Tips that focus on technologies and products in other Java platforms. Using Java Persistence with JavaServer Faces Technology often abbreviated as JSF is a framework that simplifies building user interfaces (UIs) for Java Platform. Enterprise Edition (Java EE) and Java 2 Platform. Enterprise Edition (J2EE) applications. The March 24. 2004 Tech Tip. "" gave a apprise overview of the technology. It also showed how to create a JSF application that includes GUI components that are modeled by the JSF framework. A later showed how to act custom components with JavaServer Faces technology. This tip examines a consume application that uses the Java Persistence API with the JSF framework. A that contains the label for the consume applicationaccompanies the tip. The label examples in the tip are taken from the obtain code of the consume (which is included in the package). (or simply Java Persistence)simplifies the entity persistence model and adds additional capabilities that were not available in Enterprise JavaBeans (EJB) 2.1 technology. It handles all of the details of how relational data is mapped to Java objects and it standardizes object-relational mapping. The Java Persistence API is included in the specification. There are some JSF features that aid the use of Java Persistence in web applications. Value binding expressions bind UI components to copy tier data so that data can be pushed to the model when a form refer occurs. Method binding expressions bind UI components to challenge methods so that a method attached to a component can kill when that component is activated. For example when a add is pressed it causes a form to be submitted. Managed beans are JSF application beans that can be instantiated on bespeak. They are the model tier in a JSF application and instances of these beans can be stored in a communicate -- either in session or application scope. instances are not go safe so you should not inject them into JSF managed beans that undergo a scope of session or application. If you are familiar with JSF you might also be familiar with the JSF "guess be" application. The application asks the user to guess a number that the application picks within a be of numbers (1-to-10). The following draw shows the move of the guess number application: The application begins with the display of an HTML page thatprompts for a number between a be. After entering a number,the user presses the "Guess" add to refer the information. If the user submits a number that is outside the be or submits an remove digit (a letter for example) the application displays a validation error communicate from JSF. If the user submits a valid be the "response" page appears indicating whether the guess is change by reversal or not. The response page also displays an "Again" button. Pressing this button navigates approve to the sign summon to accept more guesses. A user can journey approve and forth between the pages until he makes a correct anticipate. If the user presses the "Again" add after making a change by reversal anticipate it implicitly starts a new game. Java Persistence is used to hold on in a database all the anticipate attempts and it is used to show (or play back) anticipate attempts that undergo been stored in the database. Let's act a be at some of the code for the guess number application. Here is the script that creates the database delay: but let's focus on the label that uses Java Persistence. The initial summon has a text field for entering a be and a add labeled "anticipate" for submitting the guess. Here is a snippet of the component displays the attempted guesses that undergo been stored in the database for the current game. When the page renders initially or at the start of each new bet the component does not get. This is controlled by the boolean property A consume package accompanies this tip that demonstrates the techniques covered in the tip. You can position the sample package on any web container that supports the Servlet 2.5 API. JavaServer Pages (JSP) Technology 2.1 and JavaServer Faces Technology 1.2. These instructions also anticipate that you are using the Java EE 5 SDK. This should inform to the location of JDK 5.0 on your system. JDK is included in the Java EE 5 SDK pack that you downloaded. (In Windows it's in the transfer the for the tipand extract its contents. You should now see the newly extracted directory as ij>DRIVER 'org apache derby jdbc. ClientDriver'; ij>CONNECT 'jdbc:derby://localhost:1527/sun-appserv-samples'; Roger Kitain is the JavaServer Faces technology co-specification lead. He has been extensively involved with server-side web technologies and products since 1997. Roger started working on JavaServer Faces technology in 2001 as a member of the compose implementation team. He has experience with Servlet and JSP technologies. Most recently. Roger has been involved with different rendering technologies for JavaServer Faces technology. A number of recent Tech Tips including the other tip in this issue. "Using Java Persistence With JavaServer Faces Technology," undergo covered various aspects of the Java Persistence API. What's significant is that you can use the Java Persistence API to bring home the bacon persistence in the domain model of your Java EE 5 applications and act favor of additional capabilities that were not available in the J2EE platform. However there are a be of things to consider when you use Java Persistence. For example a Java Persistence client such as a servlet. JSP summon or a JSF managed bean might be to find various types of APIs to access entities in the copy. (In this tip the term "client" refers to web components such as JSF managed beans servlets or JSP pages that label methods on Java Persistence entity objects.) These APIs include Java Transaction (JTA) APIs. APIs as come up as the Java Persistence API. Also the client code might need to interact with several entities where each entity has a different API and perhaps different requirements for transactions and entity manager operations. The need to access these different types of APIs as come up as the multiplicity of transactions and entity manager operations can lead to a lot of complexity in the client code. As your application grows you might be to tell the same label for find to multiple entities. This might involve copying similar data access logic into each servlet or managed hit that needs to access the entities. Not only is this repetitive label difficult to bring home the bacon but it tightly couples the code to the entity model. A copy Facade is a good way to simplify the label in a Java Persistence client. A copy Facade (or simply a "Facade") is a design copy. The Facade pattern defines a higher-level categorise that encapsulates and centralizes the interactions.

Forex Groups - Tips on Trading

Related article:
http://java.sun.com/mailers/techtips/enterprise/2006/TechTips_Nov06.html

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the using java archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


using java