Classetta

Classetta

Check www.classetta.com for a quick demo.

Part of being a programmer is knowing and working in many different languages. While most languages follow the same basic principals, their verbiage can vary. For example, to find the first instance of a sub-string in a string, the following methods all basically do the same thing:

  • indexOf
  • index
  • strPos
  • instr
  • find

Of course each language specifies different parameters in different orders. But those types of things are easy to look up. However I’ve always found difficult to look up and remember Class syntax. Classes are complex – and instead of just being easily swappable one-liners, they’ll often have different rules, different syntax, different code architecture patterns, and support more-or-less features of classical OOP. Further, some languages are strongly typed, some weakly typed, and some not typed at all. The variety of Class implementations is probably greater than any other language commonality.

At the end of the day, though, Classes all serve the exact same purpose – no matter which language. In fact, you could start with simple UML / flowchart model of a class and convert it to any language you desire. With this in mind, I came up with an idea for a new project. A simple website that lets you build a model-class and automatically convert it to code. Free from writing any code, strictly an interface for building a model class. The project would convert the model into a the code for a Class in each major language I work with. And that’s exactly what I made: (www.classetta.com)

Classetta's editor for modeling classes.

As you can see, the Editor tab is selected, and a generic, completely abstract, model class was created. The class is public, named ThoroughDemo, inherits from Someclass, implements Demoable, Listable, and Comparable interafaces. It also has many member varibles and, not shown, methods.

On the Java tab, you can see how Java would implement this hypothetical class:

Classetta generated Java code based on the model class.

Likewise, on the C# tab, you can see how C# would implement this hypothetical class:

Classetta generated C# code based on the model class.

And finally, on the Ruby tab, you can see how Ruby would implement this hypothetical class:

Classetta generated Ruby code based on the model class.

Of course, Classetta.com also supports Python, PHP, JavaScript (Vanilla, ES6/Babel, TypeScript), Visual Basic (VB6, and .NET), Perl, Ce++ and Swift.

As I learn more languages, I hope to add more tabs to classetta.com. Stay tuned for a video-demonstration coming soon!

September 14, 2015 at 5:26 pm | Code Projects

 

Add Comment

* Required information
(never displayed)
 
Bold Italic Underline Strike Superscript Subscript Code PHP Quote Line Bullet Numeric Link Email Image Video
 
Smile Sad Huh Laugh Mad Tongue Crying Grin Wink Scared Cool Sleep Blush Unsure Shocked
 
1000
 
Notify me of new comments via email.
 
 
Powered by Commentics

Comments

No comments yet.
© Greg Miller, 2009-2017
2fc29791367c6a4ba13727b560c2f2bd7c5945e536a239782d