charles ross

+ Follow
since Mar 31, 2014
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by charles ross

Hi Ranch folk and critters

I am a Java Learner who just won't go where I am told. I learn best by making things my way, so I may be in trouble here. It's a kind of long dumb question.

I have latched on to the Phraseomatic because it amuses me, and that's my number 1 priority to stay with something. I have Got the Phraseomatic servlet running on my local Spring Tool Suite setup, on the tc server they provide, and I fancied it up, then I put the phrases into an embedded database and that's working purty good, podners.

But now I am trying to figure out this whole Spring thing, have made it through some Hello this and that tutorials.

I have figured out that in Spring, this Servlet app (KathyServlet and PhraseOMatic2) ought to be converted to a Spring MVC app somehow, and I started that, and I got a thing to work, still with the database,  but tain't right. It generates the Phrase once when the app starts, not every time you hit the link.

I have  the PhraseOMatic2.makePhrase() method in a very similar format to the original in the book and it's called from the html template via a Controller but I don't think I am using the right design in Spring.

Is there some way in Spring web apps that you should just call a java program such as PhraseOMatic2 in the straightforward way that it's done in the KathyServlet in the book? It just calls the method right there in the PrintWriter line like this

and we see the phrase on that line regenerated with a page refresh.

How would we do that in a Spring MVC web app page?

1 week ago
Question for Mr Kinney...

I haven't read the book - I have been through several Node books with the heartbreak of deprecated code in the examples because I worked through the books slower than Node was changing. I walked through all the examples in Prag Prog "Node the Right Way" which I thought was a very good book.

I am not sure I have even seen any Electron books til now, but I have done some hobby projects.

My question is - has writing Mac menus been made any easier (since 2015) for civilians like me? 3 years is a LONG time in Nodeland...
I thought I was pretty smart getting an app running on Windows and then it pretty well just worked on Linux - but struggled a lot to get my menus to work for Mac. Really surprised that Linux and Windows had more menu commands in common than Mac had with either of them.

Is it still like that in 2019?
Electron is cool because you write a desktop app in HTML and Javascript and in theory the app will run on Windows, Mac, Linux. It is essentially a local web server (Node) and you make your desktop UI with web pages.  

This is how Github provides Atom and Microsoft is able to support VS Code on all 3 platforms.

The heartbreak of it is that writing Electron menu code still depends in varying degrees on the desktop OS.

There are tons of NPM and other JS packages/libraries that you can glue together to build a desktop app with. Node/NPM in theory promotes small software tools that do a job in the unix commands spirit. I was able to follow a tutorial (a broken tutorial) to build a Markdown Editor that uses the Ace JS editor and some other packages. See
Electron is from Github, and seems Open Source oriented. From what I have seen, the Javascript "Uglify" tool is the main way to do this in Electron packaging.

Once article on Medium touching this topic: "Bundle ES6 backend for Electron app with WebPack & obfuscation"
2018 - latest edition still a solid book .Adds JPA and JSF.
6 months ago
You probably want to learn HttpUrlConnection. So do I.