Box Mastery Flashcards

1
Q

Command to create a new ColdBox app with quick and authentication.

A

coldbox create app skeleton=cbTemplate-quick-with-auth

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Command to remove CRSF interceptor

A

uninstall verify-csrf-interceptor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Command to populate a new .env file

A

dotenv populate –new

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Command to start a new server running the latest of Lucee 5

A

server start cfengine=lucee@5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Command to install migrations table using commandbox-migrations.

A

migrate install

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Command to create a migration

A

migrate create create_some_table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Command to run migrations

A

migrate up

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

By convention, QuickORM places models in what folder?

A

models/entities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Component to extend when creating Quick entity

A

component extends=”quick.models.BaseEntity” accessors=”true” {}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to define column alias in QuickORM.

A

property name=”body” column=”somealias”;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to override model key in QuickORM

A

variables._key = “SOME_COLUMN”; // add to each model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Handlers by convention are __.

A

plural

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Set the default event in ColdBox

A

In ColdBox.cfc:

coldbox = {
defaultEvent=”Handler.action”
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Get a single Post entity with Quick

A

getInstance( “Post” ).findOrFail( rc.postId )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Get all Post entities with Quick

A

getInstance( “Post “).all()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Get the first Post entity where title=’sometitle’ with Quick

A

getInstance( “Post” )
.where( “title”, “sometitle”)
.firstOrFail()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

You need to __ when making a model change.

A

?fwreinit=true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Limit words to 30 characters within Quick model

A

return variables._str.limitWords( text, 30 )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Define GET route in Router.cfc

A

get( “/some/route”, “Handler.action”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Define GET and POST for a single route in Router.cfc

A
route( "/some/route")
.withHandler("someHandler")
.toAction( {
 GET: "index", 
 POST: "update"
});
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Set the view in a handler

A

event.setView( “dir/view” );

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Link to action

A

event.buildLink(“handler.action”);

23
Q

With cbguard, how do you secure handler function?

A

function someMethod(event, rc, prc) secured {

}

24
Q

When creating override method within Quick entity, how do you assign a value.

A

assignAttribute(“column”, value);

25
Q

Create a resourceful route in Router.cfc

A

resource(resource=”Posts”, parameterName=”postId”),

26
Q

How to add hidden field to form so ColdBox can determine put/post methods

A

html.startForm(method=”method”, action=”action”)

27
Q

Command to install debugger tool for seeing queries and other metrics.

A

install cbdebugger –saveDev

28
Q

What should be added to Coldbox.cfc development() method to enable cbdebugger with emphasis on Quick?

A
function development() {
    debugger.debugMode = true;
    debugger.expandQBPanel = true; 
}
29
Q

Command to scaffold Quick entity with column, relationships, and create a migration.

A

quick entity create name=Entity attributes=col1,col2,col3 relationships=belongsTo:Entity,belongsTo:Entity2 –migration

30
Q

In Quick, define a Post model that has many comments but eager loads the ‘commenter’ relationship under comments.

A

// In Posts.cfc

function comments() {
    return hasMany("comments").with("commenter");
}
31
Q

Bullet train for Mac OS X terminal

A

zsh bullet train

32
Q

App to convert tag code to cfscript

A

http://cfscript.me

33
Q

Module that is version control for your database

A

cfmigrations

34
Q

cfmigrations is built on the __ module, which is database agnostic.

A

qb (query builder)

35
Q

Command to install cfmigrations

A

install cfmigrations

install commandbox-migrations to install scaffolding tools

36
Q

Module that secures routes and events with flexible rules, and restrict to certain permissions with annotations

A

cbsecurity

37
Q

Command to open the current directory in VS Code from the command line

A

code .

Must be installed to PATH from VS Code Command Palette

38
Q

Command to install new coldbox app with cbinteria, quick, and tailwind.

A

coldbox create app skeleton=cbtemplate-quick-tailwind-inertia

npm run watch (x2)

39
Q

Run cfformat on a single file and dump the contents to screen

A

cfformat run path=file.cfc

40
Q

Run cfformat on a single file and overwrite the contents to the file

A

cfformat run path=file.cfc –overwrite

41
Q

Run cfformat on an entire directory

A

cfformat watch

42
Q

Quickly create new directory and file in VSCode

A

Command + Shift + P (Command Palette) -> New File

43
Q

Links are __ elements by default, which means you can’t add padding to them properly. You can instead use __.

A

inline

inline-block

44
Q

Tailwinds breakpoints are __ breakpoints, meaning that a utility applied will apply all breakpoints that are equal or larger.

A

min-width

45
Q

Tailwind: Set an image on small devices to full width

A

<img></img>

46
Q

Tailwin: Set an image with an explicit height on small devices

A

<img></img>

47
Q

Tailwind: Set an image to cover the available space (centered) without distorting on small devices.

A

<img></img>

48
Q

Tailwind: Set text to the base text size

A

class=”text-base”

49
Q

cbFutures executors you can think of as __.

A

thread pools

50
Q

Command to install QuickORM commands line tools

A

box install quick-commands

51
Q

Autowire a test CFC using wirebox with:

A

application.wirebox.autowire( this );

52
Q

To specify what Elixir functions to run, a module needs to define an ___ file.

A

elixir-module.js

53
Q

Box Command to force install of dependency

A

box install [module] –force