70 lines
3.7 KiB
HTML
Executable File
70 lines
3.7 KiB
HTML
Executable File
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
|
|
<title>LOOP: Introduction</title>
|
|
<style type="text/css" media="all"><!--
|
|
@import "../loop.css";
|
|
@import "../layout1.css";
|
|
--></style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="Header">Class Models for Lua</div>
|
|
<div id="Logo"><img alt="small (1K)" src="../small.gif" height="70"></div>
|
|
|
|
<div id="Menu">
|
|
<div class="outside"><div class="inside"><ul>
|
|
<li><a href="../index.html", title="">Home</a></li>
|
|
<li><a href="../release/index.html", title="Installation">Install</a></li>
|
|
<li><a href="index.html", title="User Manual">Manual</a>
|
|
<div class="outside"><div class="inside"><ul>
|
|
<li><strong>Intro</strong></li>
|
|
<li><a href="basics.html", title="Basic Concepts">Basics</a></li>
|
|
<li><a href="models.html", title="Class Models">Models</a></li>
|
|
<li><a href="classops.html", title="Class Features">Classes</a></li>
|
|
<li><a href="components.html", title="Component Models">Comps</a></li>
|
|
</ul></div></div>
|
|
</li>
|
|
<li><a href="../library/index.html", title="Class Library">Library</a></li>
|
|
<li><a href="../contact.html", title="Contact People">Contact</a></li>
|
|
<li><a href="http://luaforge.net/projects/oil/", title="Project at LuaForge">LuaForge</a></li>
|
|
</ul></div></div>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
<h1>Introduction</h1>
|
|
|
|
<p>Although LOOP is currently being used in a couple of projects (<i>e.g.</i> <a href="http://oil.luaforge.net">OiL</a>) and you might use it in your own projects, it is provided here primarily as a resource to learn Lua, in particular OOP (object-oriented programming) in Lua.
|
|
Therefore, the ideal is that you take some time to actually study Lua prior to learn and use LOOP.
|
|
An excellent starting point is the <a href="http://www.lua.org/pil2">Programming in Lua</a> book.</p>
|
|
|
|
<p>Usually, it is not a good idea to use LOOP if you do not know Lua very well.
|
|
Similarly, you generally should not use LOOP just to emulate in Lua solutions that are particularly suitable for object-oriented languages.
|
|
This is because Lua provides mechanisms more powerful and flexible than classes or other popular OO concepts (check out the examples in the <a href="http://www.lua.org/pil2">book</a> mentioned above).
|
|
Therefore, it is wise to first learn the language and then keep OO techniques as one of many useful resources to use in your code.
|
|
Once you feel comfortable with Lua's features (you do not need to become an expert), you shall study and use the LOOP models.
|
|
You may also change or extend them to suit different situations, or evaluate and compare them to other or your own class models.
|
|
Most implementations of LOOP models are quite simple and minimalist, therefore they are easy to learn and understand.</p>
|
|
|
|
<p>On the other hand, if you do not have the time now to learn Lua, but want to find out whether you can do OOP in Lua, then take a quick look on the rest of this <a href="index.html">User Manual</a> and browse the <a href="../library/index.html">Class Library</a>.
|
|
There, you will find a wide variety of examples of OOP in Lua.
|
|
However, keep in mind that LOOP models are just one possibility of OOP in Lua and it is generally possible to emulate OOP models of other languages in Lua, as done <a href="http://luaforge.net/search/?type_of_search=soft&words=class&Search=Search">elsewhere</a>.</p>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
<p><small><strong>Copyright (C) 2004-2008 Tecgraf, PUC-Rio</strong></small></p>
|
|
<small>This project is currently being maintained by <a href="http://www.tecgraf.puc-rio.br">Tecgraf</a> at <a href="http://www.puc-rio.br">PUC-Rio</a>.</small>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|