PDA

View Full Version : Realbasic ? again



Rsadeika
08-22-2011, 07:36 PM
It was awhile back, when a thread was started about Realbasic, but I do not remember if the OP had gone ahead and started to develop with the language. I guess I am curious as to how many people here, are developing with Realbasic? I guess the next question is, what is the $99 version really worth, in terms of usage? What can you really do with it?

A couple of months back I wrote a personal terminal program using freeBASIC, it does the job, but it is not a GUI. It also lacks an xmodem feature, which I assume Realbasic would be able to handle, and would have plenty examples as to how to do it?

Thanks

Ray

davejames
08-22-2011, 09:38 PM
Ray...that was probably me.

Nope, haven't taken the plunge and bought Real Studio (aka Real Basic). My investigation into the package kinda petered out; too much other stuff to do in finishing the project. And the version I require costs $300...not yet ready to invest that much without a bunch more research!

If you go that route, I'd be interested in your experiences.

Regards

ratronic
08-22-2011, 09:59 PM
You might consider RobotBasic it's free.

localroger
08-23-2011, 02:31 AM
A few months ago I did a very serious investigation into moving from VB6 to RealBasic for the stuff I do at work. The nannyware on the dev package was an annoyance but not a deal-killer since that doesn't extend to the final products distributed to customers. The multi-platform support was a very big draw. But what killed it was the almost fanatical devotion to OOP without any workarounds; sometimes you actually need global variables or a way to look at the whole program at once in a big linear listing instead of as a single method at a time. I decided RB was about as different from VB6 as .NET was, in a way that made all my old stuff equally un-translatable, but not in a direction I really wanted to go.

Dr_Acula
08-23-2011, 03:20 AM
sometimes you actually need global variables or a way to look at the whole program at once in a big linear listing instead of as a single method at a time.

Yes I agree and it has affected my choices of languages too. As an example I was writing some code where almost every function needed to know the location of a "screen" pointer to draw pixels on the screen. Sure, you can pass the location from the main() to a sub function and then to a sub sub function.

But there was one routine where I thought I would not need the location of 'screen' and so it was not passed. And this function was nested several deep. And then I changed my mind, and had to pass the value through all the tree of nested functions. And then that upset the syntax of all the other calls to those functions because now they needed 'screen' added as well.

It took ages to clean up the program, and it all would have been so much simpler with just one global variable.

VB6 still gets the job done in a lot of instances. VB.net is great too, but I just *knew* when I posted some code on the internet written in vb.net 2008 that sooner or later another version would come along that was incompatible, and along has come 2010, and now the PMs and messages are starting along the lines of "your code does not work". And some of the programs were only 10 lines.

My new wish list for an 'ideal' language now includes backwards compatability, forever!

HollyMinkowski
08-23-2011, 06:43 AM
If you use C then your programming efforts will translate better to the uC
world. There are lots of free compilers that allow you to make windows apps.
You might check here for a compiler/IDE
http://www.freebyte.com/programming/cpp/

And there is a free BASIC to C translator available that makes small exe's.
One nice thing is you could look at the generated C source as a C learning aid.
People use this translator to make small and fast Win GUI programs.
http://bcx-basic.sourceforge.net/

Tor
08-23-2011, 10:24 AM
As an example I was writing some code where almost every function needed to know the location of a "screen" pointer to draw pixels on the screen. Sure, you can pass the location from the main() to a sub function and then to a sub sub function.

But there was one routine where I thought I would not need the location of 'screen' and so it was not passed. And this function was nested several deep. And then I changed my mind, and had to pass the value through all the tree of nested functions. And then that upset the syntax of all the other calls to those functions because now they needed 'screen' added as well. For this particular kind of scenario I would just use functions to get and set those 'global' variables, instead of accessing them directly. This way it's easy to add access to them where needed, and they still don't have to be declared as global variables as such (just having real global variables creates headaches of their own).

E.g. 'setscreenvalue (value)', 'value=getscreenvalue()'. And the actual 'screen' value would be local to the functions. In C you would have getscreenvalue/setscreenvalue in a separate source file, with the actual 'screen' variable statically declared to that file (and thus won't be in the symbols list of the compiled file).

One good thing about doing the access to the variable this way (besides getting rid of the global variable) is that if you suddenly need to mutex-protect access to it you don't have to change all the code everywhere, just handle that in those set/get functions. (well, for the propeller the hub mem is kind of implicitly protected, but there could be other things you suddenly need to do at the same time as you access that variable. Even just a 'printf ("screen changed to %d\n", screen);').
In C++ you would do such things in an object, but it's the same thing really.

If or when performance becomes a concern, i.e. if the overhead of using functions to access the variable, then it's possible to basically keep the code but let the compiler inline-optimize it all. A good compiler can rewrite it as if you were explicitly accessing the 'screen' variable directly everywhere it's used. You only need to either re-arrange the declarations a little bit, or use a compiler that can do global optimization when presented with all the source files at once.

-Tor

Dr_Acula
08-23-2011, 10:56 AM
For this particular kind of scenario I would just use functions to get and set those 'global' variables, instead of accessing them directly.

What a brilliant idea! So simple too. Thanks++

Re the OP
I guess the next question is, what is the $99 version really worth, in terms of usage?

I haven't bought a programming language for a while (the ones I have bought were vb5, vb6 and Basic4Android) so I guess I'd need to see some good reasons to spend $99. But if the reasons were good, I'd spend that. Hopefully someone who has used it will chime in soon.

max72
08-23-2011, 12:11 PM
In tha past Ariba said he used PureBasic.

Maybe he could chime in too...

Heater.
08-23-2011, 12:31 PM
Given the huge number of compilers, IDEs and GUI dev kits we have available for free now a days RealBASIC would have to offer something very special to be worth $99 or $300.

Jesse Massey
08-23-2011, 01:55 PM
I know this is getting off topic but to solve the problem of global variables in OOP you should implement a singleton. http://en.wikipedia.org/wiki/Singleton_pattern

Jesse

davejames
08-23-2011, 05:47 PM
@Heater - the draw for me is semi-easy translation from VB2005 and multi-platform output (Win, Linux, Mac).

That $300 is for the multi-platform feature and a license to sell a product based on Real Studio.

JimInCA
08-23-2011, 10:12 PM
others beat me to it first...
Jim...

davejames
08-24-2011, 03:51 AM
others beat me to it first...
Jim...

Jim - do you have experience with Real Studio?!? Are you holding out on me?!!!

:smile:

Rsadeika
08-24-2011, 02:20 PM
Even though I like some of the features of Realbasic, like programming for Win and linux, I am not ready to layout $300. I guess my next question is, is there some FREE clone of Real Studio, or a good comparable substitute?

Ray

Kevin Wood
08-24-2011, 03:35 PM
Lazarus is a cross platform IDE for Object Pascal. It's what was used to build BST. Qt Creator is a cross platform C/C++ IDE for developing with Qt. It's being used for PZST.

Other than that, there's anything that you can configure to run. If you're not concerned about heavily protecting your code, you might want to look at Python or Perl plus a widget toolkit for UIs.

JimInCA
08-24-2011, 04:27 PM
Jim - do you have experience with Real Studio?!? Are you holding out on me?!!!

:smile:

Not holding out on you. I added a comment about the Singleton design pattern, but others had already replied prior to me...
Jim...

davejames
08-24-2011, 05:58 PM
Not holding out on you. I added a comment about the Singleton design pattern, but others had already replied prior to me...
Jim...

Understood.

BTW - I looked at the "singleton" link providing by Mr. Massey...uh...wow...you'll have to explain it to me!

Rsadeika
08-24-2011, 07:41 PM
Yea, looked at Qt, looks like a pretty steep learning curve with that, plus I am not sure if I want to get involved with C, since this will be personal projects. The Lazarus Pascal route, that seems like I would be going backwards in programming, not to insult any of the Pascal people. So, does anybody else have any suggestions?

Ray

ctwardell
08-24-2011, 07:59 PM
Ray,

Have you looked a Visual Studio Express?

.Net is not really so horrible if you are targeting Windows.

C.W.

localroger
08-25-2011, 01:34 AM
Net is not really so horrible if you are targeting Windows.

Neither was VS6. What is horrible is the near certainty that one day Microsoft will stab you in the back and withdraw all support so as to force you into something different as they did to the pre-.NET Visual Studio users. Anybody who commits major time to any development system offered by those same people, no matter how good it is, is a complete fool. The first tremors of that are already afoot; in the Win8 preview there was mention of some New Thing and none of .NET, and a lot of people (who no doubt remembered the past) were unthrilled.

Kevin Wood
08-25-2011, 02:04 AM
The Lazarus Pascal route, that seems like I would be going backwards in programming, not to insult any of the Pascal people. So, does anybody else have any suggestions?

That's a pretty uninformed statement, considering you're looking for an IDE for programming in Basic. Object Pascal isn't the 1983 Pascal that you learned in junior high, any more than Visual Basic is the 1983 equivalent of Basic.

ctwardell
08-25-2011, 02:31 AM
Anybody who commits major time to any development system offered by those same people, no matter how good it is, is a complete fool.

Or a pragmatist...

C.W.

DavidM
08-25-2011, 03:11 AM
It was awhile back, when a thread was started about Realbasic, but I do not remember if the OP had gone ahead and started to develop with the language.

Ray

Hi Ray,

I think I was the one some time back contributing/promoting the use of realbasic for use with microcontrollers, and got some harsh criticism as well. but I also got a few to make the switch ( so to speak) .

I look at it this way,

To be good at programming you have to spend many hours and years developing your skills, If you are going to "INVEST" all that effort a few hundred bucks is very well spent.

Having said that, If you have spent all that time learning a language, you want to be able to develop finished apps with it and not just limit yourself to one kind of industry, i.e electronics, or one kind of platform, i.e windows,

So why not shoos an IDE that can build any kind of applications on any platform!

With one button press you can generate compiled machine code apps for all major platforms, PC MAC & LINUX, and you really don't need to worry about which platform you are working with, RB takes care of most of it. I develop on a mac, nearly all my clients use PC's

While I am currently developing serial ( RS232 and RS485 ) interface apps for use with propeller, I am building up my skills for other adventures, i,e business software.

RB has many types of database connectivity as well has comms HTTP, SERIAL, TCP, UDP..

Most of all the OOP in realbasic is way under estimated, you CAN really do more with less code.

My only drawback is the fact that unlike most C implementations, you only have one method call ( function) per screen for any given event or object, whether that be your own class's or just events. so its sometimes difficult to see where your are in a large application. But if you stick with insisting on making your own class's FOR EVERYTHING, then you can make life easier. Essentially all code is organised under events or separate objects.

Just recently RB has released a WEB EDITION, without learning any new "web style" code, you can use the same IDE and therefore language to make full HTML5 compliant applications. I am not into this, but it does look cool.
have a look here http://www.realsoftware.com/web/video

You can make apps that do just about anything, Audio, Video, graphics, 3D, you can write your own IDE's, terminal app, corporate databases etc, just about anything, So If you spend a lot of time learning a language really well, then make sure that your future has options.

http://www.realsoftware.com/realstudio/desktop.php

so far I have not found anything that RB CAN'T do. and most important i find the RB Language REALLY easy to read and understand, compared to C and all those brackets!!

Also, an important point is that you DONT HAVE TO USE OOP style when developing apps, you can mix and match any coding style you like.

Regards

Jesse Massey
08-25-2011, 03:28 AM
Understood.

BTW - I looked at the "singleton" link providing by Mr. Massey...uh...wow...you'll have to explain it to me!

The idea is simple. You create a class where the Constructor is declared as a private member. Doing so makes it impossible for you to create an instance of the class outside of the class. Instead you declare a static property inside the class that create a instance of the class. This guarantees that only one instance of the class can ever be created thus allowing you to have global state in an otherwise stateless program.

After reading my explanation you might be more confused.

DavidM
08-25-2011, 04:41 AM
It took ages to clean up the program, and it all would have been so much simpler with just one global variable.



Hi,

In real basic you can have variables declared for the whole application, or for any objects, i.e windows, buttons, databases etc. These can be set to Global, private and public.

or you can use properties and add these to a class objects and access them anywhere ( depending on the scope) there are a bucket load of options and various ways of organising your variables in realbasic, you can get or set anything anywhere



dave m

Rsadeika
08-25-2011, 01:43 PM
Last night I decided to download the free trial version of RB, and after working through the quick start session, RB is not for me. If I were going to become a professional programmer, and somebody was paying me to learn RB, then I might consider it.

I also downloaded freepascal lazarus, and I am going to give that a shot. I did notice that lazarus does not have a widget/gizmo for gaining access to a serial port, I guess you need to find a third party solution or write one yourself. So, this is a minus for lazarus, which also means I will not be able to create my own personal terminal program very easily, if at all. I will probably give the tutorial a trial run, but things are not looking good.

What I am looking for is an easy way of creating a GUI terminal program that will run in windows and linux. I have worked with Visual C#, and I did create a small terminal program, to bad Microsoft does not support linux, that would be a good solution to my problem.

Ray

Jesse Massey
08-25-2011, 01:52 PM
Last night I decided to download the free trial version of RB, and after working through the quick start session, RB is not for me. If I were going to become a professional programmer, and somebody was paying me to learn RB, then I might consider it.

I also downloaded freepascal lazarus, and I am going to give that a shot. I did notice that lazarus does not have a widget/gizmo for gaining access to a serial port, I guess you need to find a third party solution or write one yourself. So, this is a minus for lazarus, which also means I will not be able to create my own personal terminal program very easily, if at all. I will probably give the tutorial a trial run, but things are not looking good.

What I am looking for is an easy way of creating a GUI terminal program that will run in windows and linux. I have worked with Visual C#, and I did create a small terminal program, to bad Microsoft does not support linux, that would be a good solution to my problem.

Ray

Actually they do support linux in the form of MONO. Take a look http://www.mono-project.com/Main_Page. You can target any platform you want and still program in C#.

Q*bert
08-25-2011, 02:57 PM
I've been usng PureBasic for a few years now and I can highly recommend it. I've done small utility programs to large database applications with it. Check it out at purebasic.com and the forums at http://www.purebasic.fr/english/.

It's cross-platform (Windows, OSx, Linux), has very nice support for databases (MySQL), graphics, serial communications, and much more. It also has an active user community that is constantly developing libraries and support utilities.

But one of my favorite features is that it compiles to very, very tight machine code with no external libraries or support dlls. A simple utility program can be 10kb with no supporting files to distribute. It executes very quickly too!

I'm a very happy customer.

davejames
08-25-2011, 04:49 PM
after reading my explanation you might be more confused.

Got that right!!!

:lol:

DavidM
08-25-2011, 10:43 PM
What I am looking for is an easy way of creating a GUI terminal program that will run in windows and linux.
Ray

Hi ray,

what made you think that realbasic cannot do what you want?
I have a written a "Terminal"type app in RB, all of the serial port features are already built in, all you need to do is link it up with a GUI, in fact a page or two of code and you should have a finished app that will run on PC MAC and LINUX?

In fact, download this terminal app ( for mac or PC ) this was written with realbasic.
http://freeware.the-meiers.org/CoolTerm_Screenshot.html
http://freeware.the-meiers.org/

Can I ask what put you "OFF" using realbasic?

and another thing, REAL SOFTWARE has been around for a long time, while I here all about other "open source" freebees, many of them don't hang around.

what you may have found is the "examples" that realbasic provide are very much out of date, and do not show of the capabilities.

another thing,

I believe there is a free version of realbasic for LINUX.
thanks

Dave M

Rsadeika
08-26-2011, 07:12 PM
I decided to just stick with freeBASIC, in fact I just installed freeBASIC on my linux box, compiled my personal terminal program, and it runs. It is like magic, did not have to adjust the code at all.

Ray

DavidM
08-29-2011, 08:09 AM
Hi Rsadeika,

I believe there is a FREE PERSONAL EDITION available for LINUX, if you email REAL SOFTWARE (custserv@realsoftware.com) you should be able to get a free copy.

Dave M