Skip to content

Commit eca2491

Browse files
committed
add inital readme for Lucee 6
1 parent b7ea4c9 commit eca2491

File tree

2 files changed

+109
-16
lines changed

2 files changed

+109
-16
lines changed

README-Lucee6.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
![Lucee](https://raw.githubusercontent.com/lucee/Lucee/6.0/images/lucee-white.png#gh-dark-mode-only)
2+
![Lucee](https://raw.githubusercontent.com/lucee/Lucee/6.0/images/lucee-black.png#gh-light-mode-only)
3+
4+
5+
# Lucee 6
6+
7+
Lucee comes with a lot of new features and functionality that improve your interaction with Lucee both directly through new features and indirectly by enhancing the existing ones. The focus as always is not simply to add functionality that you can achieve yourself with CFML code but to enhance the language itself.
8+
9+
Stay tuned as we explore the exciting world of Lucee 6. Get ready to elevate your CFML game with the latest and greatest.
10+
11+
## Java
12+
13+
Lucee now offers an array of enhanced functionalities for a more seamless integration between Lucee and Java applications and code.
14+
15+
### Java Code inside CFML!
16+
17+
In Lucee 6 you have the flexibility to incorporate Java code directly within your CFML code opening up new possibilities for seamless integration.
18+
19+
#### Within a User Defined Function (UDF):
20+
21+
```java
22+
int function echoInt(int i) type="java" {
23+
if(i==1) throw new Exception("Oopsie-daisy!!!");
24+
return i*2;
25+
}
26+
```
27+
28+
Simply add the attribute `[type="java"]` and you can effortlessly embed Java code within your CFML template.
29+
30+
#### Or in a Closure:
31+
32+
```java
33+
to_string = function (String str1, String str2) type="java" {
34+
return new java.lang.StringBuilder(str1).append(str2).toString();
35+
}
36+
```
37+
38+
Please note that this feature isn't supported for Lambda Functions as the Lambda Syntax conflicts with the attribute "type=java".
39+
40+
41+
### Components
42+
43+
In Lucee 6, we've expanded your options by introducing sub-components, a powerful addition to your CFML toolkit. Unlike traditional components defined in separate .cfc files, sub-components reside within the same template as the main component, offering you increased flexibility and improved code organization.
44+
45+
#### Why Use Sub Components?
46+
47+
Sub-components bring several benefits to the table:
48+
49+
- **Modularization**: Sub-components enable you to break down complex components into smaller, more manageable pieces. This modular approach simplifies development, testing, and maintenance.
50+
- **Reusability**: Components that are used across multiple templates can be encapsulated as sub-components. This reusability reduces code duplication and promotes a DRY (Don't Repeat Yourself) coding practice.
51+
- **Scoped Variables**: Sub-components can access variables within the parent component's scope, simplifying data sharing between related components.
52+
- **Improved Collaboration**: In team projects, sub-components can make it easier for developers to work on specific parts of a component without affecting the entire structure. This promotes collaboration and concurrent development.
53+
- **Code Organization**: Sub-components help maintain a clean and organized codebase by keeping related functionality together within a single template.
54+
- **Testing Isolation**: When unit testing components, sub-components can be tested in isolation, allowing for more targeted and granular testing.
55+
- **Easier Debugging**: Smaller, focused sub-components can make debugging more straightforward since you can pinpoint issues within specific sections of your code.
56+
- **Version Control**: Sub-components can be managed and version-controlled independently, providing more control over changes and updates.
57+
- **Performance Optimization**: In certain cases, splitting functionality into sub-components can lead to more efficient code execution, especially when components are conditionally loaded based on specific use cases.
58+
- **Simplified Component Management**: With sub-components, you can manage related code within a single template, making it easier to locate and edit all associated functionality.
59+
60+
These additional benefits highlight the versatility and advantages of using sub-components in your CFML applications.
61+
62+
#### Example of Sub Component Definition:
63+
64+
```cfml
65+
component {
66+
function mainTest() {
67+
return "main";
68+
}
69+
}
70+
71+
component name="Sub" {
72+
function subTest() {
73+
return "sub";
74+
}
75+
}
76+
77+
// Usage example
78+
cfc = new MyCFC();
79+
echo("main -> " & cfc.mainTest());
80+
echo("<br>");
81+
82+
cfc = new MyCFC$Sub();
83+
echo("sub -> " & cfc.subTest());
84+
echo("<br>");
85+
```
86+
87+
Sub-components expand your horizons and provide new avenues for structuring your CFML code effectively.

README.md

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
![Lucee](https://raw.githubusercontent.com/lucee/Lucee/6.0/images/lucee-white.png#gh-dark-mode-only)
22
![Lucee](https://raw.githubusercontent.com/lucee/Lucee/6.0/images/lucee-black.png#gh-light-mode-only)
33

4-
![GitHub](https://img.shields.io/github/license/lucee/Lucee)
5-
5.3 [![Java CI](https://github.com/lucee/Lucee/actions/workflows/main.yml/badge.svg?branch=5.3)](https://github.com/lucee/Lucee/actions/workflows/main.yml)
6-
5.4 [![Java CI](https://github.com/lucee/Lucee/actions/workflows/main.yml/badge.svg?branch=5.4)](https://github.com/lucee/Lucee/actions/workflows/main.yml)
7-
6.0 [![Java CI](https://github.com/lucee/Lucee/actions/workflows/main.yml/badge.svg?branch=6.0)](https://github.com/lucee/Lucee/actions/workflows/main.yml)
8-
[![Backers on Open Collective](https://opencollective.com/Lucee/backers/badge.svg)](#backers)
9-
[![Sponsors on Open Collective](https://opencollective.com/Lucee/sponsors/badge.svg)](#sponsors)
10-
11-
[![Maven Central](https://img.shields.io/maven-central/v/org.lucee/lucee)](https://mvnrepository.com/artifact/org.lucee/lucee)
12-
[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/lucee/Lucee)](https://github.com/lucee/Lucee/pulls)
13-
[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/lucee/Lucee)](https://github.com/lucee/Lucee/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed)
14-
15-
[![docker pulls](https://img.shields.io/docker/pulls/lucee/lucee.svg?label=docker+pulls)](https://hub.docker.com/r/lucee/lucee/)
16-
[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/lucee)](https://opencollective.com/lucee#section-contributors)
17-
[![GitHub contributors](https://img.shields.io/github/contributors/lucee/Lucee)](https://github.com/lucee/Lucee/graphs/contributors)
18-
19-
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fdownload.lucee.org%2F)](https://download.lucee.org/)
204

215
## Lucee Server
226

@@ -26,6 +10,9 @@ Lucee simplifies technologies like webservices (REST, SOAP, HTTP), ORM (Hibernat
2610

2711
Lucee provides a compatibility layer for Adobe ColdFusion &copy; CFML using less resources and delivering better performance.
2812

13+
[What is new with Lucee 6](README-Lucee6.md)
14+
15+
2916
## Installation
3017

3118
You can [build Lucee from source](https://docs.lucee.org/guides/working-with-source.html) or grab one of our distributions:
@@ -70,6 +57,25 @@ For more peruse the [Lucee Manifesto](https://dev.lucee.org/t/lucee-manifesto/18
7057

7158
The Lucee team is always open to feedback and active at CFML community events, and is keen to remind people that Lucee is a community project.
7259

60+
61+
![GitHub](https://img.shields.io/github/license/lucee/Lucee)
62+
5.3 [![Java CI](https://github.com/lucee/Lucee/actions/workflows/main.yml/badge.svg?branch=5.3)](https://github.com/lucee/Lucee/actions/workflows/main.yml)
63+
5.4 [![Java CI](https://github.com/lucee/Lucee/actions/workflows/main.yml/badge.svg?branch=5.4)](https://github.com/lucee/Lucee/actions/workflows/main.yml)
64+
6.0 [![Java CI](https://github.com/lucee/Lucee/actions/workflows/main.yml/badge.svg?branch=6.0)](https://github.com/lucee/Lucee/actions/workflows/main.yml)
65+
[![Backers on Open Collective](https://opencollective.com/Lucee/backers/badge.svg)](#backers)
66+
[![Sponsors on Open Collective](https://opencollective.com/Lucee/sponsors/badge.svg)](#sponsors)
67+
68+
[![Maven Central](https://img.shields.io/maven-central/v/org.lucee/lucee)](https://mvnrepository.com/artifact/org.lucee/lucee)
69+
[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/lucee/Lucee)](https://github.com/lucee/Lucee/pulls)
70+
[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/lucee/Lucee)](https://github.com/lucee/Lucee/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed)
71+
72+
[![docker pulls](https://img.shields.io/docker/pulls/lucee/lucee.svg?label=docker+pulls)](https://hub.docker.com/r/lucee/lucee/)
73+
[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/lucee)](https://opencollective.com/lucee#section-contributors)
74+
[![GitHub contributors](https://img.shields.io/github/contributors/lucee/Lucee)](https://github.com/lucee/Lucee/graphs/contributors)
75+
76+
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fdownload.lucee.org%2F)](https://download.lucee.org/)
77+
78+
7379
## Contributors
7480

7581
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].

0 commit comments

Comments
 (0)