With there being so many new programming languages and technologies, developers are plagued with being experts of a greater field. Given that there is STILL only 24 hrs a day is available, something has to give. It is my opinion that developers are spreading themselves too thin and developing applications with less and less expertise. This is leading to more and more shoddy implementations of 'throw-away' code.
What is Code Projection and String Theory?
Code Projection: It is generating code from a programmed process.
String Theory: It is the concept that all code can be rendered into text file for parsing by a compiler.
Using Code Projection, developers can program in their language of choice to create code generated text files of a "projected' programming language for implementation. As an example, a Java expert programmer can write a programming process to generate code files for Javascript and implemented in a browser or NodeJS server. The same can be said for using C# to create text files of Java code.
Over the years there has been a number of implementation of code translators that can assist in the conversion of a code base to another language, but Code Project is more than simply conversion it is the deliberate programming of creating text files for code in 'any' language.
Using String Theory, developers can focus only on the creation of strings that represent the required language syntax and commands for implementation. As you will see in my exploration of Frame(s)work, I create strings of html through javascript programming that are injected into the browser in 'real-time', dynamically. When a developer can conceive that 'project code' is written into a string for immediate parsing or text file writing, it changes how they develop.
I submit that one of the greatest deficits in the code development is that developers are left to design code solutions while trying to program the code requirements. It is time for architects to participate in the implementaiton of code for their designs. In my discussion about the roles of software teams, I layout that the current software architects need to develop OOP designs for implementation in the required languages.
HISTORY
If you have been developing for less than 20 years you may have only heard of a programming language named Visual Basic. This is not to be confused with Visual Basic.net. Visual Basic was the language millions of developers used (in the 90's) to build client/server applications, also known as WinForm applications. Visual Basic was a powerhouse tool for developers looking to ramp up their productivity contributions to team development. In short, it was the foundation of building the pc application development paradigm. But Visual Basic was retired when .Net Framework was introduced in 2002 but VBA lives on to this day.
Visual Basic for Applications was introduced in 1997 as a programming language for the MS Office Applications. Many MS Excel users have no idea that there is a complete IDE (Integrated Development Environment) available to leverage programming for their spreadsheet requirements. VBA is available for Access, Excel, Word, Powerpoint and Visio. Through VBA, a developer can not only program the hosting application but they can automate other MS Office Programs. In fact, my first application products were combinations of MS Office Applications, with custom programming to automate each for a fully integrated user experience.
ENTER STRING THEORY
It was after 20 years of developing that I realized code was just a text file. It came in 2012 when I was building an HTML 5 application (before there was SPA frameworks). I was needing to inject html code into the body of a page and I found a solution that incorported the creation of a js string variable that contained the code for a menu element.
It looked like:
var menu = '<menu><li><button onclick="copy()">Copy</button></li><li><button onclick="cut()">Cut</button></li><li><button onclick="paste()">Paste</button></li></menu>';
AFTER ASSIGING THE VARIABLE WITH THE STRING, INJECT INTO THE BODY OF THE PAGE.
$(body).append(menu);
It was like a light came on! I could create any strings of html, js and css and inject them into a web page for adding funcionality 'on demand'. I used this approach for my own Single Page Application designs. But I stretched the concept even further, when I began storing the strings html, js, & css in a database for querying and then injecting into the web page. This then opened up to external editing of strings as a psuedo content management system, but managing code that is injected to web pages. This is embodied in a platform I built, name Biztalks This platform introduced the use of iFrames as containers for web pages embedded in other pages. This will become very important for the Frame(s)work design.
ENTER MS EXCEL
Since seeing my first spreadsheets in the late '80s, I intuitively understood the visual power of dynamically calculated, matrix structured data. The addition of the 'macro' opened up the ability to create scripts that impact a spreadsheet. When scripting evolved to the level of VBA, it became clear MS Excel can be used as a development tool and as a customizable solution. In my first licensable application, it used MS Access as the user interface, but then launched an 'invisible' instance of MS Excel to display a progress form while it ran VBA monte carlo simulations that would be delivered to bookmarks contained in an MS Word document template (launched from the VBA commands within MS Excel).
MS Excel is a powerful text writer! It provides the ability to add data to sheets that can be used to dynamically create code as text written to a file (fitted with the extension of the programming language. i.e. .py, .js, .cs). Many developers have used MS Excel to create code from Worksheet Functions, but this is not what I am talking about! Let's look at the difference:
WORKSHEET FUNCTIONS-CONCATENATION OF DYNAMIC VALUES
= "public string " &A81& " {get;} = " &C81&";"
VBA FUNCTION FOR LOOPING THROUGH ROWS AND CONCATENATING INTO A VARIABLE
'Below assumes you are referencing the Microsoft Scripting Runtime library
Dim fso As FileSystemObject, ts As TextStream
Set fso = New FileSystemObject
Worksheets("InterfaceMethods").Activate
Range("C2").Select
Dim start As Boolean
start = False
Set ts = fso.OpenTextFile("C:\DataProcessing.json", ForWriting, True, TristateFalse)
ts.WriteLine "{ ""var" & paramIterator & "Name"": """ & param.ParameterName _
& """, ""var" & paramIterator & "Type"": """ & param.ParameterType & _
""", ""var" & paramIterator & "Value"": """ & CleanJSONValue(param.ParameterValue) & """}"
As you can see above, using VBA we can instantiate referenced objects that provide functionality to open/write to a file and then write a line to a text file (with concatenating strings and variable values.
WHY USE CODE PROJECTION
Every Software product struggles with developing through an upgrade path. The longer the development stays in the same technology, the more code is committed to a technology that may be growing obsolete. If the product adopts new technologies to build out new features and functionality, eventually there will be a patchwork of inconsistencies. There is so much more to this, but the gist is that code will become outdated and obsolete due to changes in hardware and technology advancements.
Code Projection is the ability to use a single programming language (like VBA) to generate programming for any language, as text files. The concept of 'Code Projection' is to generate programming logic in any language. Just imagine, VBA code is written to implement a routing logic. The VBA is written to implement the same logic in CSharp or Javascript. Using Excel spreadsheets, we can add the details for methods, parameters and any logic required. The VBA programming will parse the spreadsheet cells to create the programming language syntax as text written to a text file.
Applications are written with many standard operations. When using Code Projection with Method Routing designs, Json Objects can be created for use in functional objects.
To learn more about the future of Visual Basic for Applications visit the Microsoft Site (click below).
Copyright © 2023 Fundamental Technology - All Rights Reserved.
Powered by GoDaddy
A Place to Explore Programming that is Efficient and Elegant. Frame(s)work is designed for those looking to interact directly with HTML5.
We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.