PDA

View Full Version : Some tips for a hard-core RPG guy?



RPG-Animal
05-14-2009, 03:58 PM
Hello,

I downloaded the latest version of Valence yesterday and played around with the demo programs for a few hours. I made some minor changes to the front-end code and saw the effect in the browser - very cool. The look and feel of these programs are much more modern-looking than anything else I've tried.

So my question here isn't regarding a specific technical issue (yet), but more general or philosophical...

Here's my situation: I've been programming on the AS/400 at my company since 1996. I would consider myself a top-notch RPG guy now. If someone here needs a new green screen subfile program or a screen change or anything like that, I can usually whip it up within a day or so without having to bat an eye (hence my "RPG Animal" nickname).

But programming for the browser so far has been a different story for me. I've taken some of our green screen programs and made them work in Internet Explorer, trialing several different tools, but none of my users really liked them all that much. Frankly, I wasn't nuts about the results myself. That "lipstick on a pig" phrase comes to mind.

So now I'm diving into this strange new world of developing programs to use "Web 2.0" components explicitly, and I'm feeling like quite the novice all over again. With that in mind, I'm curious to hear how you guys, as RPG programmers, managed to get comfortable with this whole new paradigm of front-end and back-end programming for the web. Did it take you long to learn this stuff? Do you feel like you can produce a program in Valence as fast as you could create the equivalent green screen program?

-Dave

robert.swanson
05-14-2009, 05:53 PM
Hello "Animal" Dave,

Welcome to the Valence Forum and the brave new world of Web 2.0 programming! Sounds to me like you're doing the right thing, playing with the front-end component logic in the demo programs and getting accustomed to all the ways you can tweak them. My first advice as a fellow RPG programmer is this: Don't get caught up trying to understand everything you see in the JavaScript (ExtJS) front-end. The code looks a little different from what you're used to in the RPG world, but you'll soon find that much of it doesn't really matter. It's like a bunch of /copy source that you don't even need to worry about. In fact, when I go to create a new front-end Valence program, I almost always just take something I've already done (or one of the many demo programs) to use as a starting point, then go from there.

So I recommend you continue focusing on the basics of the front-end demo programs you downloaded with Valence, making changes to their appearance and behavior so you understand their capabilities. You'll quickly see that when you want to adjust a web component beyond what's shown in the demos, the documentation is top-notch and easy to follow. I'm sure you'll be amazed at how much you can control with so little code. It's way different from the green screen world.

The back-end RPG should be a piece of cake for you, assuming you're accustomed to ILE RPG. Even if you're not, the demo programs do a great job of demonstrating the steps required to send and receive data between your AS/400 and the browser. That's really the only difference in the RPG code, how you interface with the users. All your business logic should pretty much stay the same.

As an RPGer, I bet you'll find the most impressive (dare I say "fun") part of Valence programming will be working with the grids, which are the equivalent of subfiles in the 5250 world. Only grids are radically more powerful - it's incredible how much functionality is built into these grid components. Almost all the things you had to worry about in subfile programming are non-issues with grids. In fact, you can do things in a few lines of code that would be virtually impossible to do in a green screen subfile, like allowing users to change the sort order by clicking on the column header, resize or turn off columns, move columns around, group and ungroup categories, etc. -- it's all built in, and it only takes a line or two of code to activate!

So to address your last question: I think everyone I know that has learned to program in Valence would tell you that within a week or two you'll find it's actually FASTER to develop a Web 2.0 app on your System i compared to creating the equivalent in a green screen. And I use the term "equivalent" loosely here because the Web 2.0 applications you'll create will be in no way equivalent to green screen applications. Also, unlike the screen-scraper programs you tried, your users should absolutely LOVE working with your Valence apps because they perform fast, they look slick, and they're inherently more user-friendly.

Just my two cents!

Robert

richard.milone
05-14-2009, 09:32 PM
Welcome RPG-Animal,

I think Rob gave you some good info to get started. I'd also like to point out that the CNX development team is available to help you develop your first prototype application at no cost. And of course you can post questions in this forum whenever you like. I have found that most Valence developers are shy about asking questions here. So thanks for posting. Hopefully you will continue to post more questions and the information will help others.

sean.lanktree
05-15-2009, 12:32 AM
Hello Dave -

Just keep at it, continue to tweak the demo programs and then work your way to creating a program of your own. At some point it all just starts to click. Once it does, yes (to answer your question), you should be creating applications for the web just as efficient as you are now creating green screen applications. However, the result of your web applications will create a vastly improved experience for your users.